From 791a25c554d7166f1036323db86a73c851f60f80 Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Thu, 6 May 2021 15:45:09 +0800
Subject: [PATCH 1/6] * Finish task #37931.
---
module/product/view/browse.html.php | 33 ++++++++++++++++-------------
module/story/control.php | 4 +++-
module/story/model.php | 2 +-
3 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index f9c941754e..52255f52fe 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -402,24 +402,27 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
echo '';
}
- if($canBatchChangeStage)
+ if($storyType == 'story')
{
- echo "
';
- }
- else
- {
- $class= "class='disabled'";
- echo "" . html::a('javascript:;', $lang->story->stageAB, '', $class) . '';
}
?>
diff --git a/module/story/control.php b/module/story/control.php
index f921378519..dd9f529591 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -749,7 +749,9 @@ class story extends control
if($storyType == 'requirement')
{
unset($customFields['plan']);
- $showFields = str_replace('plan', '', $showFields);
+ unset($customFields['stage']);
+ $showFields = str_replace('plan', '', $showFields);
+ $showFields = str_replace('stage', '', $showFields);
}
$this->view->customFields = $customFields;
$this->view->showFields = $showFields;
diff --git a/module/story/model.php b/module/story/model.php
index e057aafc49..8277649b58 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -1068,7 +1068,7 @@ class storyModel extends model
if($oldStory->plan != $story->plan) $this->updateStoryOrderOfPlan($storyID, $story->plan, $oldStory->plan);
$this->executeHooks($storyID);
- $this->batchChangeStage(array($storyID), $story->stage);
+ if($story->type == 'story') $this->batchChangeStage(array($storyID), $story->stage);
if($story->closedReason == 'done') $this->loadModel('score')->create('story', 'close');
$allChanges[$storyID] = common::createChanges($oldStory, $story);
}
From 8a1ab47e0abe111c2839d899ce73b577ad5ba05d Mon Sep 17 00:00:00 2001
From: qiyu-xie
Date: Thu, 6 May 2021 15:50:26 +0800
Subject: [PATCH 2/6] * Finish task#37930.
---
module/story/control.php | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/module/story/control.php b/module/story/control.php
index dd9f529591..70759ad1da 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -1909,18 +1909,23 @@ class story extends control
unset($stories[$story->id]);
}
}
+
if(!empty($children))
{
- $position = 0;
+ $reorderStory = array();
foreach($stories as $story)
{
- $position ++;
+ $reorderStory[$story->id] = $story;
if(isset($children[$story->id]))
{
- array_splice($stories, $position, 0, $children[$story->id]);
- $position += count($children[$story->id]);
+ foreach($children[$story->id] as $childrenID => $childrenStory)
+ {
+ $reorderStory[$childrenID] = $childrenStory;
+ }
}
+ unset($stories[$story->id]);
}
+ $stories = $reorderStory;
}
}
From 931b4e51bd9220e7ea7f32944a66f98d41046761 Mon Sep 17 00:00:00 2001
From: tianshujie98
Date: Thu, 6 May 2021 15:50:50 +0800
Subject: [PATCH 3/6] * Fix bug #12520.
---
module/task/js/batchcreate.js | 10 +++++++++-
module/task/view/batchcreate.html.php | 1 +
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js
index dd2ff4963f..bc3669ef4b 100755
--- a/module/task/js/batchcreate.js
+++ b/module/task/js/batchcreate.js
@@ -194,7 +194,15 @@ $(document).on('mousedown', 'select', function()
$(function()
{
/* Adjust width for ie chosen width. */
- var chosenWidth = $('#module1_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 0c0b3a886c..c762761c8b 100644
--- a/module/task/view/batchcreate.html.php
+++ b/module/task/view/batchcreate.html.php
@@ -200,5 +200,6 @@
task->ditto);?>
+
From 36d42a882d0389879bc6495e44e42b9c2280426d Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Thu, 6 May 2021 15:52:16 +0800
Subject: [PATCH 4/6] * Fix bug #12491.
---
module/qa/model.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/module/qa/model.php b/module/qa/model.php
index 0737fccc04..7635bf30d5 100644
--- a/module/qa/model.php
+++ b/module/qa/model.php
@@ -24,6 +24,7 @@ class qaModel extends model
public function setMenu($products, $productID, $branch = 0, $extra = '')
{
if(!in_array($this->app->rawModule, $this->config->qa->noDropMenuModule)) $this->lang->switcherMenu = $this->loadModel('product')->getSwitcher($productID, $extra, $branch);
+ if($this->app->rawModule == 'product' and $this->app->rawMethod == 'showerrornone') $this->lang->switcherMenu = '';
common::setMenuVars('qa', $productID);
}
From 78f08ca7009f788d1193b7896d97053d79f3aeb5 Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Thu, 6 May 2021 16:03:37 +0800
Subject: [PATCH 5/6] * Adjust the code.
---
module/upgrade/model.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/upgrade/model.php b/module/upgrade/model.php
index 10d5310de1..3a323df66d 100644
--- a/module/upgrade/model.php
+++ b/module/upgrade/model.php
@@ -2790,7 +2790,7 @@ class upgradeModel extends model
$fromVersion = $this->config->installedVersion;
$needProcess = array();
if(strpos($fromVersion, 'max') === false and strpos($fromVersion, 'biz') === false and (strpos($fromVersion, 'pro') === false ? version_compare($fromVersion, '8.3', '<') : version_compare($fromVersion, 'pro5.4', '<'))) $needProcess['updateFile'] = true;
- if(strpos($fromVersion, 'max') === false)
+ if(strpos($fromVersion, 'max') === false and $this->config->systemMode == 'new')
{
if(strpos($fromVersion, 'pro') !== false and version_compare($fromVersion, 'pro10.0', '<'))
{
@@ -2800,7 +2800,7 @@ class upgradeModel extends model
{
$needProcess['search'] = true;
}
- elseif(version_compare($fromVersion, '15.0', '<'))
+ elseif(version_compare($fromVersion, '15.0.rc1', '<'))
{
$needProcess['search'] = true;
}
From 4520e903fb3f4a58a6dab69ad00b4c29cce55fe4 Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Thu, 6 May 2021 16:29:16 +0800
Subject: [PATCH 6/6] * Fix bug #2852.
---
module/common/view/datatable.fix.html.php | 10 ++++++-
module/datatable/control.php | 36 ++++++++++++++---------
module/product/control.php | 1 +
module/story/view/view.html.php | 2 ++
4 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/module/common/view/datatable.fix.html.php b/module/common/view/datatable.fix.html.php
index 6ed9254b0d..fbb3031a4e 100644
--- a/module/common/view/datatable.fix.html.php
+++ b/module/common/view/datatable.fix.html.php
@@ -17,7 +17,15 @@ $(function()
datatable->$datatableId->mode) ? $config->datatable->$datatableId->mode : 'table';?>
var $dropdown = $('');
var $dropmenu = $('');
- $dropmenu.append("moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'>datatable->custom?>");
+ if(typeof(storyType) != 'undefined' && storyType == 'requirement')
+ {
+ $dropmenu.append("moduleName . '&method=' . $this->methodName . '&extra=requirement')?>' data-toggle='modal' data-type='ajax'>datatable->custom?>");
+ }
+ else
+ {
+ $dropmenu.append("moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'>datatable->custom?>");
+
+ }
$dropmenu.append("\", true);' id='switchToDatatable'>datatable->switchToDatatable : $lang->datatable->switchToTable;?>");
$dropdown.append($dropmenu).appendTo($btnToolbar);
}
diff --git a/module/datatable/control.php b/module/datatable/control.php
index 4c2b53230b..6707a493bf 100644
--- a/module/datatable/control.php
+++ b/module/datatable/control.php
@@ -3,17 +3,17 @@
* The view file of datatable module of ZenTaoPMS.
*
* @copyright Copyright 2014-2014 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
- * @license business(商业软件)
+ * @license business(商业软件)
* @author Hao sun
- * @package datatable
+ * @package datatable
* @version $Id$
* @link http://www.zentao.net
*/
class datatable extends control
{
/**
- * Construct function, set menu.
- *
+ * Construct function, set menu.
+ *
* @access public
* @return void
*/
@@ -24,7 +24,7 @@ class datatable extends control
/**
* Save config
- *
+ *
* @access public
* @return void
*/
@@ -47,13 +47,14 @@ class datatable extends control
/**
* custom fields.
- *
- * @param string $module
- * @param string $method
+ *
+ * @param string $module
+ * @param string $method
+ * @param string $extra
* @access public
* @return void
*/
- public function ajaxCustom($module, $method)
+ public function ajaxCustom($module, $method, $extra = '')
{
$target = $module . ucfirst($method);
$mode = isset($this->config->datatable->$target->mode) ? $this->config->datatable->$target->mode : 'table';
@@ -85,17 +86,24 @@ class datatable extends control
$setting = json_encode($this->config->$module->datatable->defaultField);
}
- $this->view->cols = $this->datatable->getFieldList($module);
+ $cols = $this->datatable->getFieldList($module);
+ if($extra == 'requirement')
+ {
+ unset($cols['plan']);
+ unset($cols['stage']);
+ }
+
+ $this->view->cols = $cols;
$this->view->setting = $setting;
$this->display();
}
/**
* Ajax reset cols
- *
- * @param string $module
- * @param string $method
- * @param string $confirm
+ *
+ * @param string $module
+ * @param string $method
+ * @param string $confirm
* @access public
* @return void
*/
diff --git a/module/product/control.php b/module/product/control.php
index 5996b5b15f..7a4b1c24bb 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -248,6 +248,7 @@ class product extends control
$this->lang->story->create = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->create);
$this->config->product->search['fields']['title'] = $this->lang->story->title;
unset($this->config->product->search['fields']['plan']);
+ unset($this->config->product->search['fields']['stage']);
}
/* Build search form. */
diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php
index 869350d735..8d3282d80e 100644
--- a/module/story/view/view.html.php
+++ b/module/story/view/view.html.php
@@ -318,6 +318,7 @@
story->status;?> |
processStatus('story', $story);?> |
+ type != 'requirement'):?>
| story->stage;?> |
@@ -333,6 +334,7 @@
?>
|
+
| story->pri;?> |
pri;?>' title='story->priList, $story->pri)?>'>story->priList, $story->pri)?> |