diff --git a/module/api/view/releases.html.php b/module/api/view/releases.html.php
index ca0afb44b6..1c1e1a7d69 100644
--- a/module/api/view/releases.html.php
+++ b/module/api/view/releases.html.php
@@ -41,7 +41,7 @@
| addedBy, '');?> |
addedDate;?> |
- createLink('api', 'deleteRelease', "libID=$libID&id=$release->id"), '', 'hiddenwin', "title='{$lang->api->delete}' class='btn'");?>
+ createLink('api', 'deleteRelease', "libID=$libID&id=$release->id"), '', 'hiddenwin', "title='{$lang->api->deleteRelease}' class='btn'");?>
|
diff --git a/module/api/view/struct.html.php b/module/api/view/struct.html.php
index d7f744ab1f..f1983a737b 100644
--- a/module/api/view/struct.html.php
+++ b/module/api/view/struct.html.php
@@ -49,8 +49,8 @@
addedDate;?> |
createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '', '', "title='{$lang->api->edit}' class='btn'");
- if(common::hasPriv('api', 'deleteStruct')) echo html::a($this->createLink('api', 'deleteStruct', "libID=$libID&structID=$struct->id"), '', 'hiddenwin', "title='{$lang->api->delete}' class='btn'");
+ if(common::hasPriv('api', 'editStruct')) echo html::a($this->createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '', '', "title='{$lang->api->editStruct}' class='btn'");
+ if(common::hasPriv('api', 'deleteStruct')) echo html::a($this->createLink('api', 'deleteStruct', "libID=$libID&structID=$struct->id"), '', 'hiddenwin', "title='{$lang->api->deleteStruct}' class='btn'");
?>
|
diff --git a/module/bug/control.php b/module/bug/control.php
index 0beba6c819..b2e402475e 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -407,7 +407,16 @@ class bug extends control
if($this->app->tab == 'execution')
{
- $location = $this->session->bugList ? $this->session->bugList : $this->createLink('execution', 'bug', "executionID={$output['executionID']}");
+ if(!preg_match("/(m=|\/)execution(&f=|-)bug(&|-|\.)?/", $this->session->bugList))
+ {
+ $location = $this->session->bugList;
+ }
+ else
+ {
+ $executionID = $this->post->execution ? $this->post->execution : $output['executionID'];
+ $location = $this->createLink('execution', 'bug', "executionID=$executionID");
+ }
+
}
elseif($this->app->tab == 'project')
{
diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php
index 216fbacdf6..e34988bbdb 100644
--- a/module/bug/view/view.html.php
+++ b/module/bug/view/view.html.php
@@ -93,7 +93,7 @@
if($this->app->tab != 'product')
{
- common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='" . $this->app->tab . "'", $lang->bug->toStory);
+ common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='product'", $lang->bug->toStory);
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
}
diff --git a/module/ci/model.php b/module/ci/model.php
index 7d632d1519..0bf3b7ca57 100644
--- a/module/ci/model.php
+++ b/module/ci/model.php
@@ -54,6 +54,7 @@ class ciModel extends model
*/
public function syncCompileStatus($compile)
{
+ /* Max retry times is: 3. */
if($compile->times >= 3)
{
$this->dao->update(TABLE_COMPILE)->set('status')->eq('failure')->where('id')->eq($compile->id)->exec();
diff --git a/module/common/view/noticeimport.html.php b/module/common/view/noticeimport.html.php
index 5f87dd9b43..600fcbea00 100644
--- a/module/common/view/noticeimport.html.php
+++ b/module/common/view/noticeimport.html.php
@@ -27,5 +27,7 @@ function submitForm(type)
$('.modal-body #insert').val(type == 'insert' ? 1 : 0);
$('#importNoticeModal .form-actions .btn').addClass('disabled');
$("button[data-target='#importNoticeModal']").closest('form').submit();
+
+ setTimeout(function(){$('#importNoticeModal .form-actions .btn').removeClass('disabled');}, 1000);
}
diff --git a/module/compile/model.php b/module/compile/model.php
index f395bbb110..07738955a0 100644
--- a/module/compile/model.php
+++ b/module/compile/model.php
@@ -178,8 +178,8 @@ class compileModel extends model
$this->dao->update(TABLE_COMPILE)->data($compile)->where('id')->eq($compileID)->exec();
$this->dao->update(TABLE_JOB)
- ->set('lastStatus')->eq($build->status)
- ->set('lastExec')->eq($build->updateDate)
+ ->set('lastStatus')->eq($compile->status)
+ ->set('lastExec')->eq($compile->updateDate)
->where('id')->eq($job->id)
->exec();
diff --git a/module/doc/js/objectlibs.js b/module/doc/js/objectlibs.js
index 992cb3cae6..8830c91235 100644
--- a/module/doc/js/objectlibs.js
+++ b/module/doc/js/objectlibs.js
@@ -133,7 +133,7 @@ $(function()
$('#content').on('click', '.outline .outline-toggle i.icon-angle-right', function()
{
- $('.article-content').width('85%');
+ $('.article-content').css('width', '85%');
$('.outline').css({'min-width' : '180px', 'border-left' : '2px solid #efefef'});
$(this).removeClass('icon-angle-right').addClass('icon-angle-left').css('left', '-9px');
$('.outline-content').show();
diff --git a/module/gitlab/model.php b/module/gitlab/model.php
index 437a2a05ce..b2af4366f7 100644
--- a/module/gitlab/model.php
+++ b/module/gitlab/model.php
@@ -411,7 +411,7 @@ class gitlabModel extends model
if(is_numeric($host)) $host = $this->getApiRoot($host);
if(strpos($host, 'http://') !== 0 and strpos($host, 'https://') !== 0) return false;
- $url = sprintf($apiRoot, $api);
+ $url = sprintf($host, $api);
return json_decode(commonModel::http($url, $data, $options));
}
@@ -635,7 +635,7 @@ class gitlabModel extends model
*
* @param int $gitlabID
* @access public
- * @return void
+ * @return array
*/
public function apiGetProjects($gitlabID)
{
@@ -1715,9 +1715,9 @@ class gitlabModel extends model
/**
* Create webhook for zentao.
*
- * @param int $products
- * @param int $gitlabID
- * @param int $projectID
+ * @param array $products
+ * @param int $gitlabID
+ * @param int $projectID
* @access public
* @return bool
*/
@@ -1830,7 +1830,7 @@ class gitlabModel extends model
if($value) $issue->$field = $value;
}
- if($isset($issue->assignee_id) and $issue->assignee_id == 'closed') unset($issue->assignee_id);
+ if(isset($issue->assignee_id) and $issue->assignee_id == 'closed') unset($issue->assignee_id);
/* issue->state is null when creating it, we should put status_event when updating it. */
if(isset($issue->state) and $issue->state == 'closed') $issue->state_event = 'close';
diff --git a/module/gitlab/view/view.html.php b/module/gitlab/view/view.html.php
index 30fc445968..b1cb6b07d3 100644
--- a/module/gitlab/view/view.html.php
+++ b/module/gitlab/view/view.html.php
@@ -27,4 +27,3 @@
-
diff --git a/module/job/control.php b/module/job/control.php
index f4ba69c1dc..961f71c525 100644
--- a/module/job/control.php
+++ b/module/job/control.php
@@ -120,7 +120,7 @@ class job extends control
$this->view->repoTypes = $repoTypes;
$this->view->products = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->projectID);
- $this->view->jenkinsServerList = $this->loadModel('jenkins')->getPairs();
+ $this->view->jenkinsServerList = array('' => '') + $this->loadModel('jenkins')->getPairs();
$this->display();
}
@@ -352,7 +352,7 @@ class job extends control
if($productLeft == $productRight) $matchedProducts[$productName] = $productRight;
}
}
- die(json_encode($matchedProduct));
+ die(json_encode($matchedProducts));
}
$productName = $this->loadModel('product')->getByID($repo->product)->name;
diff --git a/module/job/model.php b/module/job/model.php
index 72514a4d49..2e69ab65f1 100644
--- a/module/job/model.php
+++ b/module/job/model.php
@@ -378,7 +378,7 @@ class jobModel extends model
if($job->triggerType == 'tag')
{
- $lastTag = $this->getLastTagByRepo($repo);
+ $lastTag = $this->getLastTagByRepo($repo, $job);
if($lastTag)
{
$build->tag = $lastTag;
@@ -444,7 +444,7 @@ class jobModel extends model
/**
* Exec gitlab pipeline.
*
- * @param int $job
+ * @param object $job
* @access public
* @return void
*/
@@ -486,11 +486,12 @@ class jobModel extends model
/**
* Get last tag of one repo.
*
- * @param object $repo
+ * @param object $repo
+ * @param object $job
* @access public
* @return void
*/
- public function getLastTagByRepo($repo)
+ public function getLastTagByRepo($repo, $job)
{
if($repo->SCM == 'Subversion')
{
diff --git a/module/message/model.php b/module/message/model.php
index 1a6df4425b..27d92e820f 100644
--- a/module/message/model.php
+++ b/module/message/model.php
@@ -47,10 +47,7 @@ class messageModel extends model
$objectActions = array();
foreach($this->config->message->objectTypes as $objectType => $actions)
{
- foreach($actions as $action)
- {
- $objectActions[$objectType][$action] = str_replace($this->lang->webhook->trimWords, '', $this->lang->action->label->$action);
- }
+ foreach($actions as $action) $objectActions[$objectType][$action] = $this->lang->message->label->$action;
}
return $objectActions;
}
diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php
index 3fa6265c48..58494e26f8 100644
--- a/module/my/view/task.html.php
+++ b/module/my/view/task.html.php
@@ -96,7 +96,7 @@
}
else
{
- echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', '', $task->project), $task->name, null, "style='color: $task->color' data-group='execution'");
+ echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', '', $task->project), $task->name, null, "style='color: $task->color'");
}
?>
children)) echo '
';?>
@@ -104,7 +104,7 @@
systemMode == 'new'):?>
createLink('project', 'index', "projectID=$task->project"), $task->projectName);?> |
-
createLink('execution', 'task', "executionID=$task->execution"), $task->executionName, '', "data-group='execution'");?> |
+
createLink('execution', 'task', "executionID=$task->execution"), $task->executionName, '');?> |
openedBy);?> |
@@ -171,7 +171,7 @@
systemMode == 'new'):?>
createLink('project', 'view', "projectID=$child->project"), $child->projectName);?> |
-
createLink('execution', 'task', "executionID=$child->project"), $child->executionName, '', "data-group='execution'");?> |
+
createLink('execution', 'task', "executionID=$child->project"), $child->executionName, '');?> |
openedBy);?> |
@@ -208,8 +208,8 @@
common::printIcon('task', 'finish', "taskID=$child->id", $child, 'list', '', '', 'iframe', true, '', '', $child->project);
common::printIcon('task', 'recordEstimate', "taskID=$child->id", $child, 'list', 'time', '', 'iframe', true, '', '', $child->project);
- common::printIcon('task', 'edit', "taskID=$child->id", $child, 'list', '', '', '', '', 'data-group="execution"', '', $child->project);
- common::printIcon('task', 'batchCreate', "executionID=$child->execution&storyID=$child->story&moduleID=$child->module&taskID=$child->id&iframe=true", $child, 'list', 'split', '', 'iframe', true, 'data-group="execution"', $this->lang->task->children, $child->project);
+ common::printIcon('task', 'edit', "taskID=$child->id", $child, 'list', '', '', '', '', '', '', $child->project);
+ common::printIcon('task', 'batchCreate', "executionID=$child->execution&storyID=$child->story&moduleID=$child->module&taskID=$child->id&iframe=true", $child, 'list', 'split', '', 'iframe', true, '', $this->lang->task->children, $child->project);
}
}
?>
diff --git a/module/product/control.php b/module/product/control.php
index 8dbc91141b..afa3f5c5d1 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -1266,6 +1266,7 @@ class product extends control
if($_POST)
{
$this->product->manageLine();
+ if(dao::isError()) die(js::error(dao::getError()));
die(js::reload('parent'));
}
diff --git a/module/product/css/view.css b/module/product/css/view.css
index e5c7c817ad..c1f6809c12 100644
--- a/module/product/css/view.css
+++ b/module/product/css/view.css
@@ -6,5 +6,5 @@ td.normal {color: #00da88;}
td.acl {white-space: nowrap;}
.row > .col-sm-12:first-child {padding-bottom: 20px;}
.c-product ,.c-release ,.c-code {width: 100px !important;}
-.c-openedBy ,.c-acl ,.c-common {width:110px !important;}
-.c-bugs {width:120px !important;}
+.c-openedBy ,.c-acl ,.c-prs ,.c-common {width:110px !important;}
+.c-bugs ,.c-type {width:120px !important;}
diff --git a/module/product/js/create.js b/module/product/js/create.js
index ba883405c5..9c79b3cd40 100644
--- a/module/product/js/create.js
+++ b/module/product/js/create.js
@@ -61,12 +61,14 @@ function toggleLine(obj)
{
$('form .line-no-exist').removeClass('hidden');
$('form .line-exist').addClass('hidden');
+ $('#line_chosen').addClass('hidden');
$line.attr('disabled', 'disabled');
}
else
{
- $('form .line-exist').removeClass('hidden');
+ $('#line').removeClass('hidden');
$('form .line-no-exist').addClass('hidden');
+ $('#line_chosen').removeClass('hidden');
$line.removeAttr('disabled');
}
}
diff --git a/module/product/lang/en.php b/module/product/lang/en.php
index b7ed529b21..77bc4261f4 100644
--- a/module/product/lang/en.php
+++ b/module/product/lang/en.php
@@ -87,6 +87,7 @@ $lang->product->programChangeTip = "The projects linked with this {$lang->pr
$lang->product->notChangeProgramTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding";
$lang->product->confirmChangeProgram = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set.";
$lang->product->changeProgramError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding";
+$lang->product->programEmpty = 'Program should not be empty!';
$lang->product->id = 'ID';
$lang->product->program = "Program";
diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php
index 7fc4525dd2..6d20c31f33 100644
--- a/module/product/lang/zh-cn.php
+++ b/module/product/lang/zh-cn.php
@@ -24,7 +24,7 @@ $lang->product->mine = '我负责';
$lang->product->other = '其他';
$lang->product->closed = '已关闭';
$lang->product->updateOrder = '排序';
-$lang->product->all = "{$lang->productCommon}列表";
+$lang->product->all = "所有{$lang->productCommon}";
$lang->product->manageLine = "维护{$lang->productCommon}线";
$lang->product->newLine = "新建{$lang->productCommon}线";
$lang->product->export = '导出数据';
@@ -87,6 +87,7 @@ $lang->product->programChangeTip = "如下项目只关联了该{$lang->produ
$lang->product->notChangeProgramTip = "该{$lang->productCommon}的{$lang->SRCommon}已经关联到如下项目,请取消关联后再操作";
$lang->product->confirmChangeProgram = "如下项目既关联了该{$lang->productCommon}又关联了其他{$lang->productCommon},请确认是否继续关联该{$lang->productCommon},勾选后将取消与其他{$lang->productCommon}的关联关系,同时转移至新项目集下。";
$lang->product->changeProgramError = "该{$lang->productCommon}的{$lang->SRCommon}已经关联到项目,请取消关联后再操作";
+$lang->product->programEmpty = '项目集不能为空';
$lang->product->id = '编号';
$lang->product->program = "所属项目集";
diff --git a/module/product/model.php b/module/product/model.php
index b7c7c80051..d3eb1d6139 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -810,7 +810,13 @@ class productModel extends model
$maxOrder = $maxOrder ? $maxOrder : 0;
foreach($data->modules as $id => $name)
{
- if(!$name) continue;
+ if(empty($name)) continue;
+ if($this->config->systemMode == 'new' and empty($data->programs[$id]))
+ {
+ dao::$errors[] = $this->lang->product->programEmpty;
+ return false;
+ }
+
$line->name = strip_tags(trim($name));
$line->root = $data->programs[$id];
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index 8419b8a322..91d8e65fec 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -132,7 +132,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';