diff --git a/module/api/control.php b/module/api/control.php
index a5d8ea2f7c..2a6d71a760 100755
--- a/module/api/control.php
+++ b/module/api/control.php
@@ -414,21 +414,7 @@ class api extends control
{
if(helper::isAjaxRequest() && !empty($_POST))
{
- $this->loadModel('api');
-
- $now = helper::now();
- $userId = $this->app->user->account;
- $params = fixer::input('post')
- ->remove('type')
- ->skipSpecial('params,response')
- ->add('addedBy', $userId)
- ->add('addedDate', $now)
- ->add('editedBy', $userId)
- ->add('editedDate', $now)
- ->setDefault('product,module', 0)
- ->get();
-
- $changes = $this->api->update($apiID, $params);
+ $changes = $this->api->update($apiID);
if(dao::isError()) return $this->sendError(dao::getError());
if($changes)
diff --git a/module/api/css/index.css b/module/api/css/index.css
index 3b8c3f5263..228854c88d 100644
--- a/module/api/css/index.css
+++ b/module/api/css/index.css
@@ -11,7 +11,7 @@
.main-col .doc-title {display: flex; font-size: 16px; margin-bottom: 15px;}
.main-col .doc-title .title {margin: 0; line-height: 30px; font-size: 25px;}
.main-col .doc-title .http-method {line-height: 27px; height: 27px; font-size: 13px; margin-right: 10px; padding: 0 10px;}
-.main-col .doc-title .path { line-height: 30px; font-size: 20px; margin-right: 15px;}
+.main-col .doc-title .path { line-height: 30px; font-size: 20px; margin-right: 15px;width:60%;word-wrap: break-word; }
.main-col .doc-title .info {flex: 1 1 0;}
.main-col .doc-title .version a {font-size: 13px; color: #8c8c8c;}
.main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;}
diff --git a/module/api/model.php b/module/api/model.php
index c5171d84e8..47c37c18ae 100644
--- a/module/api/model.php
+++ b/module/api/model.php
@@ -177,7 +177,7 @@ class apiModel extends model
/**
* Delete a struct.
*
- * @param int $id
+ * @param int $id
* @access public
* @return void
*/
@@ -192,14 +192,29 @@ class apiModel extends model
/**
* Update an api doc.
*
- * @param int $id
- * @param object $data
+ * @param int $apiID
* @access public
- * @return void
+ * @return bool|array
*/
- public function update($id, $data)
+ public function update($apiID)
{
- $oldApi = $this->dao->findByID($id)->from(TABLE_API)->fetch();
+ $oldApi = $this->dao->findByID($apiID)->from(TABLE_API)->fetch();
+
+ if(!empty($_POST['editedDate']) and $oldApi->editedDate != $this->post->editedDate)
+ {
+ dao::$errors[] = $this->lang->error->editedByOther;
+ return false;
+ }
+
+ $now = helper::now();
+ $account = $this->app->user->account;
+ $data = fixer::input('post')
+ ->remove('type')
+ ->skipSpecial('params,response')
+ ->add('editedBy', $account)
+ ->add('editedDate', $now)
+ ->setDefault('product,module', 0)
+ ->get();
$data->id = $oldApi->id;
$data->version = $oldApi->version + 1;
@@ -212,7 +227,7 @@ class apiModel extends model
->data($data)
->autoCheck()
->batchCheck($this->config->api->edit->requiredFields, 'notempty')
- ->where('id')->eq($id)
+ ->where('id')->eq($apiID)
->exec();
return common::createChanges($oldApi, $data);
diff --git a/module/api/view/edit.html.php b/module/api/view/edit.html.php
index dd1e34794e..bd7aa0d07f 100644
--- a/module/api/view/edit.html.php
+++ b/module/api/view/edit.html.php
@@ -226,6 +226,7 @@ js::set('api', $api);
|
+ editedDate);?>
goback, "data-app='{$app->tab}'");?>
goback, '', "class='btn btn-back btn-wide'");?>
|
diff --git a/module/bug/model.php b/module/bug/model.php
index b6041ce6c0..8430cb166f 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -209,7 +209,10 @@ class bugModel extends model
foreach(explode(',', $this->config->bug->create->requiredFields) as $field)
{
$field = trim($field);
- if($field and isset($bug->$field) and empty($bug->$field)) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->$field)));
+ if($field and empty($bug->$field))
+ {
+ die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->$field)));
+ }
}
$bugs[$i] = $bug;
diff --git a/module/install/lang/en.php b/module/install/lang/en.php
index d19fe950e9..5f33fbb725 100644
--- a/module/install/lang/en.php
+++ b/module/install/lang/en.php
@@ -48,7 +48,10 @@ $lang->install->introductionContent = <<Dear users, welcome to ZenTao project management system.
ZenTao has two managment modes in version 15.0 and up. One is the classic management mode, providing two core features, Product and Project; the other is a new project management mode, with Program and Execution added. The following is an introduction to the new mode:
-
+
+
Program
+
Program is used to manage a group of products and projects, and the company executives or PMO can use it for strategic planning.
+
Product
Product is used to subdivide the company's strategy into requirements that can be developed, and the product manager can use it to make release plans.
diff --git a/module/product/css/view.css b/module/product/css/view.css
index 10ad0d71a2..e5c7c817ad 100644
--- a/module/product/css/view.css
+++ b/module/product/css/view.css
@@ -5,3 +5,6 @@
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;}
diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php
index dc4add1ff5..37ce60d20f 100644
--- a/module/product/view/view.html.php
+++ b/module/product/view/view.html.php
@@ -43,9 +43,9 @@
- | productCommon;?> |
+ productCommon;?> |
PO);?> |
- product->release;?> |
+ product->release;?> |
RD);?> |
|
@@ -74,13 +74,13 @@
code)):?>
- | product->code;?> |
+ product->code;?> |
code;?> |
product->type;?> |
product->typeList, $product->type);?> |
- story->openedBy?> |
+ story->openedBy?> |
createdBy);?> |
@@ -96,10 +96,10 @@
code)):?>
- | productCommon . $lang->product->status;?> |
+ productCommon ." ". $lang->product->status;?> |
product->statusList, $product->status);?> |
- product->acl;?> |
+ product->acl;?> |
code) ? "colspan='4'" : "colspan='2'";?>>product->aclList[$product->acl];?> |
acl == 'custom'):?>
@@ -126,11 +126,11 @@
- | story->statusList['active'] . $space . $lang->story->common;?> |
+ story->statusList['active'] . $space . $lang->story->common;?> |
stories['active']?> |
product->plans?> |
plans?> |
- product->bugs?> |
+ product->bugs?> |
bugs?> |
diff --git a/module/release/model.php b/module/release/model.php
index cec7e04c2e..3e3bade43e 100644
--- a/module/release/model.php
+++ b/module/release/model.php
@@ -474,7 +474,7 @@ class releaseModel extends model
public function changeStatus($releaseID, $status)
{
$this->dao->update(TABLE_RELEASE)->set('status')->eq($status)->where('id')->eq($releaseID)->exec();
- return dao::isError();
+ return !dao::isError();
}
/**
diff --git a/module/story/lang/de.php b/module/story/lang/de.php
index e589726df6..7e01c9697c 100644
--- a/module/story/lang/de.php
+++ b/module/story/lang/de.php
@@ -254,7 +254,7 @@ $lang->story->lblClose = 'Close';
$lang->story->lblTBC = 'Task/Bug/Case';
$lang->story->checkAffection = 'Impact';
-$lang->story->affectedProjects = "{$lang->project->common}s/{$lang->execution->common}s";
+$lang->story->affectedProjects = $config->systemMode == 'new' ? "{$lang->project->common}s/{$lang->execution->common}s" : "{$lang->project->common}s";
$lang->story->affectedBugs = 'Bug';
$lang->story->affectedCases = 'Fall';
diff --git a/module/story/lang/en.php b/module/story/lang/en.php
index 9525ae0492..7510f9dda4 100644
--- a/module/story/lang/en.php
+++ b/module/story/lang/en.php
@@ -115,8 +115,8 @@ $lang->story->stage = 'Phase';
$lang->story->stageAB = 'Phase';
$lang->story->stagedBy = 'SetBy';
$lang->story->mailto = 'Mailto';
-$lang->story->openedBy = 'CreatedBy';
-$lang->story->openedDate = 'CreatedDate';
+$lang->story->openedBy = 'Created By';
+$lang->story->openedDate = 'Created Date';
$lang->story->assignedTo = 'AssignTo';
$lang->story->assignedDate = 'AssignedDate';
$lang->story->lastEditedBy = 'EditedBy';
@@ -258,7 +258,7 @@ $lang->story->lblClose = 'Close';
$lang->story->lblTBC = 'Task/Bug/Case';
$lang->story->checkAffection = 'Influence';
-$lang->story->affectedProjects = "{$lang->project->common}s/{$lang->execution->common}s";
+$lang->story->affectedProjects = $config->systemMode == 'new' ? "{$lang->project->common}s/{$lang->execution->common}s" : "{$lang->project->common}s";
$lang->story->affectedBugs = 'Bugs';
$lang->story->affectedCases = 'Cases';
diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php
index 3246283bd3..e90d636936 100644
--- a/module/story/lang/fr.php
+++ b/module/story/lang/fr.php
@@ -254,7 +254,7 @@ $lang->story->lblClose = 'Fermer';
$lang->story->lblTBC = 'Tâche/Bug/CasTest';
$lang->story->checkAffection = 'Influence';
-$lang->story->affectedProjects = "{$lang->project->common}s/{$lang->execution->common}s";
+$lang->story->affectedProjects = $config->systemMode == 'new' ? "{$lang->project->common}s/{$lang->execution->common}s" : "{$lang->project->common}s";
$lang->story->affectedBugs = 'Bugs';
$lang->story->affectedCases = 'CasTests';
diff --git a/module/story/lang/vi.php b/module/story/lang/vi.php
index b8d22f1713..b12e410b61 100644
--- a/module/story/lang/vi.php
+++ b/module/story/lang/vi.php
@@ -254,7 +254,7 @@ $lang->story->lblClose = 'Đóng';
$lang->story->lblTBC = 'Nhiệm vụ/Bug/Tình huống';
$lang->story->checkAffection = 'Ảnh hưởng';
-$lang->story->affectedProjects = "{$lang->project->common}s/{$lang->execution->common}s";
+$lang->story->affectedProjects = $config->systemMode == 'new' ? "{$lang->project->common}s/{$lang->execution->common}s" : "{$lang->project->common}s";
$lang->story->affectedBugs = 'Bugs';
$lang->story->affectedCases = 'Tình huống';
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index 8d5e25e265..ee285ec0cd 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -258,7 +258,7 @@ $lang->story->lblClose = "关闭{$lang->SRCommon}";
$lang->story->lblTBC = '任务Bug用例';
$lang->story->checkAffection = '影响范围';
-$lang->story->affectedProjects = "影响的{$lang->project->common}或{$lang->execution->common}";
+$lang->story->affectedProjects = $config->systemMode == 'new' ? "影响的{$lang->project->common}或{$lang->execution->common}" : "影响的{$lang->project->common}";
$lang->story->affectedBugs = '影响的Bug';
$lang->story->affectedCases = '影响的用例';
diff --git a/module/story/lang/zh-tw.php b/module/story/lang/zh-tw.php
index a71dd8030a..c25e83ec61 100644
--- a/module/story/lang/zh-tw.php
+++ b/module/story/lang/zh-tw.php
@@ -256,7 +256,7 @@ $lang->story->lblClose = "關閉{$lang->SRCommon}";
$lang->story->lblTBC = '任務Bug用例';
$lang->story->checkAffection = '影響範圍';
-$lang->story->affectedProjects = "影響的{$lang->project->common}或{$lang->execution->common}";
+$lang->story->affectedProjects = $config->systemMode == 'new' ? "影響的{$lang->project->common}或{$lang->execution->common}": "影響的{$lang->project->common}";
$lang->story->affectedBugs = '影響的Bug';
$lang->story->affectedCases = '影響的用例';
diff --git a/module/story/model.php b/module/story/model.php
index 57768e318c..cfddcd20c6 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -3794,7 +3794,7 @@ class storyModel extends model
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from");
if($story->type != 'requirement') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'");
- common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide);
+ if($this->app->rawModule != 'projectstory') common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide);
if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
}
else
diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js
index e7ee7788cc..2b11382752 100755
--- a/module/task/js/batchcreate.js
+++ b/module/task/js/batchcreate.js
@@ -222,16 +222,6 @@ $(document).on('mousedown', 'select', function()
$(function()
{
- /* Adjust width for ie chosen width. */
- if(!hiddenStory)
- {
- var chosenWidth = $('#module1_chosen').width();
- }
- else
- {
- var chosenWidth = 170;
- }
-
$('.chosen-container[id^=module]').width(chosenWidth);
$('.chosen-container[id^=module]').css('max-width', chosenWidth);
diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php
index d8ff99104d..905c159823 100644
--- a/module/task/view/batchcreate.html.php
+++ b/module/task/view/batchcreate.html.php
@@ -51,8 +51,6 @@
}
}
$colspan = count($visibleFields) + 3;
- $hiddenStory = (isonlybody() and $storyID) ? ' hidden' : '';
- if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
?>