From 621e382cb6d2712d2340ebd0221aaa07a7f8a09e Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 28 Jun 2022 15:35:49 +0800 Subject: [PATCH 01/40] * Finish task #58554. --- module/custom/control.php | 4 +- module/task/js/batchcreate.js | 25 ++++++++ module/task/js/common.js | 60 +++++++++++++++++++ module/task/js/create.js | 28 +++++++++ module/task/view/batchcreate.html.php | 85 ++++++++++++++------------- module/task/view/create.html.php | 60 ++++++++----------- 6 files changed, 186 insertions(+), 76 deletions(-) diff --git a/module/custom/control.php b/module/custom/control.php index 88af46aca5..64f9469391 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -675,14 +675,16 @@ class custom extends control $account = $this->app->user->account; if($this->server->request_method == 'POST') { - $fields = $this->post->fields; + $fields = $this->post->fields; if(is_array($fields)) $fields = join(',', $fields); $this->loadModel('setting')->setItem("$account.$module.$section.$key", $fields); + if(in_array($module, array('task', 'bug', 'testcase', 'story')) and $section == 'custom' and in_array($key, array('createFields', 'batchCreateFields'))) return; } else { $this->loadModel('setting')->deleteItems("owner=$account&module=$module§ion=$section&key=$key"); } + return print(js::reload('parent')); } diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index b98330264c..9d68a3483c 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -5,6 +5,31 @@ $(function() if($('th.c-name').width() < 200) $('th.c-name').width(200); if(taskConsumed > 0) bootbox.alert(addChildTask); $('#customField').on('click', function(){$('#tableBody .chosen-with-drop').removeClass('chosen-with-drop chosen-container-active')}); + + $('#customField').click(function() + { + disabledRequireFields(); + }); + + $('#formSettingForm .btn-primary').click(function() + { + $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); + var fields = ''; + $('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function() + { + fields += ',' + $(this).val(); + }); + + var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=batchCreateFields'); + $.post(link, {'fields' : fields}, function() + { + checkedShowFields(fields); + disabledRequireFields(); + $('#formSetting').parent().removeClass('open'); + }); + + return false; + }); }); $(document).on('change', "[name^='estStarted'], [name^='deadline']", function() diff --git a/module/task/js/common.js b/module/task/js/common.js index cad7f13d6f..8556c357e9 100644 --- a/module/task/js/common.js +++ b/module/task/js/common.js @@ -20,3 +20,63 @@ function setStoryModule() } } +/** + * Checked show fields. + * + * @param string fields + * @access public + * @return void + */ +function checkedShowFields(fields) +{ + var fieldList = ',' + fields + ','; + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var $fieldBox = $('.' + $(this).val() + 'Box' ); + if(fieldList.indexOf(field) >= 0) + { + + $(this).attr('checked', true); + $fieldBox.removeClass('hidden'); + } + else + { + if(!$fieldBox.hasClass('hidden')) $fieldBox.addClass('hidden'); + } + }); + + if(config.currentMethod == 'create'); + { + if(fieldList.indexOf(',estStarted,') >= 0 && fieldList.indexOf(',deadline,') >= 0) + { + $('.borderBox').removeClass('hidden'); + } + else if(fieldList.indexOf(',estStarted,') >= 0 || fieldList.indexOf(',deadline,') >= 0) + { + $('.datePlanBox').removeClass('hidden'); + if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden'); + } + else + { + if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden'); + if(!$('.datePlanBox').hasClass('hidden')) $('.datePlanBox').addClass('hidden'); + } + } +} + +/** + * Disabled require field. + * + * @access public + * @return void + */ +function disabledRequireFields() +{ + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var required = ',' + requiredFields + ','; + if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled'); + }); +} diff --git a/module/task/js/create.js b/module/task/js/create.js index 3c3c133f7b..c187786901 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -1,3 +1,31 @@ +$(function() +{ + $('#customField').click(function() + { + disabledRequireFields(); + }); + + $('#formSettingForm .btn-primary').click(function() + { + $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); + var fields = ''; + $('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function() + { + fields += ',' + $(this).val(); + }); + + var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=createFields'); + $.post(link, {'fields' : fields}, function() + { + checkedShowFields(fields); + disabledRequireFields(); + $('#formSetting').parent().removeClass('open'); + }); + + return false; + }); +}) + /** * Load module, stories and members. * diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 363d589017..26c152c7b4 100755 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -15,6 +15,26 @@ task->addChildTask);?> +task->create->requiredFields);?> +task->create->requiredFields) as $field) +{ + if($field) + { + $requiredFields[$field] = ''; + if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = ''; + } +} +$colspan = count($visibleFields) + 3; +?> +

@@ -40,32 +60,15 @@

- task->create->requiredFields) as $field) - { - if($field) - { - $requiredFields[$field] = ''; - if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = ''; - } - } - $colspan = count($visibleFields) + 3; - ?>
- + type != 'ops'):?> - + type == 'kanban'):?> @@ -73,12 +76,12 @@ - - - - - - + + + + + + task->getFlowExtendFields(); foreach($extendFields as $extendField) @@ -113,12 +116,12 @@ - type != 'ops'):?> - - - - + + - - - + + loadModel('flow'); foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . ""; @@ -189,11 +192,11 @@ - - - - - + + - - + + loadModel('flow'); foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . ""; diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index e9a1510f9a..0f6c3bf5a1 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -17,9 +17,17 @@ task->error->teamMember);?> vision);?> +task->create->requiredFields);?> +task->create->requiredFields) as $field) +{ + if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field; +} +?> +
@@ -29,12 +37,6 @@
- task->create->requiredFields) as $field) - { - if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field; - } - ?>
idAB;?>'>task->module?> moduleBox'>task->module?> '>task->story;?> storyBox'>task->story;?> task->name;?> kanbancard->lane;?> typeAB;?>'>task->assignedTo;?>'>task->estimateAB;?>'>task->estStarted;?>'>task->deadline;?>'>task->desc;?>'>task->pri;?> assignedToBox'>task->assignedTo;?> estimateBox'>task->estimateAB;?> estStartedBox'>task->estStarted;?> deadlineBox'>task->deadline;?> descBox'>task->desc;?> priBox'>task->pri;?>
style='overflow:visible'> + style='overflow: visible'> +
@@ -146,9 +149,9 @@
task->typeList, $type, 'class=form-control');?> style='overflow:visible'>>> +
> +
>>task->priList, $pri, 'class=form-control');?>task->priList, $pri, 'class=form-control');?>
%s style='overflow:visible'> + id, \"%s\")'")?> style='overflow: visible'> +
@@ -216,9 +219,9 @@
task->typeList, $type, 'class="form-control"');?> style='overflow:visible'>>> +
> +
{$lang->task->ditto}"; ?>
-
>>task->priList, $pri, 'class=form-control');?>task->priList, $pri, 'class=form-control');?>
type != 'kanban' or $this->config->vision == 'lite'):?> @@ -97,8 +99,8 @@ printExtendFields('', 'table', 'columns=3');?> - lifetime != 'ops'):?> - + lifetime != 'ops') ? '' : 'hidden'?> + - type != 'ops'):?> @@ -174,8 +175,8 @@ task->copyStoryTitle;?> - - task->pri;?> + + task->pri;?>task->priList as $priKey => $priValue) @@ -195,9 +196,9 @@ } ?> - pri, "class='form-control'");?> + pri, "class='form-control $hiddenPri'");?> -
+
@@ -206,15 +207,13 @@
- - -
+ +
task->estimateAB;?>
-
@@ -231,29 +230,23 @@ - - + - - - + + - From 6fb8d56c65ad7b781c6df233d21f7c08e01bf2f1 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 28 Jun 2022 17:09:04 +0800 Subject: [PATCH 02/40] * Finish task #58556. --- module/custom/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/custom/control.php b/module/custom/control.php index 64f9469391..7c7216bbf2 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -678,7 +678,8 @@ class custom extends control $fields = $this->post->fields; if(is_array($fields)) $fields = join(',', $fields); $this->loadModel('setting')->setItem("$account.$module.$section.$key", $fields); - if(in_array($module, array('task', 'bug', 'testcase', 'story')) and $section == 'custom' and in_array($key, array('createFields', 'batchCreateFields'))) return; + if(in_array($module, array('task', 'testcase', 'story')) and $section == 'custom' and in_array($key, array('createFields', 'batchCreateFields'))) return; + if($module == 'bug' and $section == 'custom' and $key == 'batchCreateFields') return; } else { From b0df9d23de401d64bab13011458acb6fe5db47f4 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 28 Jun 2022 17:50:37 +0800 Subject: [PATCH 03/40] * Finish task #58557. --- module/testcase/js/common.js | 43 ++++++++++++++++++++++++++++ module/testcase/js/create.js | 25 ++++++++++++++++ module/testcase/view/create.html.php | 29 ++++++++++--------- 3 files changed, 83 insertions(+), 14 deletions(-) diff --git a/module/testcase/js/common.js b/module/testcase/js/common.js index d68f4b183f..3c27543f27 100644 --- a/module/testcase/js/common.js +++ b/module/testcase/js/common.js @@ -426,3 +426,46 @@ function setModules(branchID, productID, num) $('#plan' + (num + 1)).trigger("chosen:updated"); } } + +/** + * Checked show fields. + * + * @param string fields + * @access public + * @return void + */ +function checkedShowFields(fields) +{ + var fieldList = ',' + fields + ','; + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var $fieldBox = $('.' + $(this).val() + 'Box' ); + if(fieldList.indexOf(field) >= 0) + { + + $(this).attr('checked', true); + $fieldBox.removeClass('hidden'); + } + else + { + if(!$fieldBox.hasClass('hidden')) $fieldBox.addClass('hidden'); + } + }); +} + +/** + * Disabled require field. + * + * @access public + * @return void + */ +function disabledRequireFields() +{ + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var required = ',' + requiredFields + ','; + if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled'); + }); +} diff --git a/module/testcase/js/create.js b/module/testcase/js/create.js index 5a525a8ba6..336e316691 100644 --- a/module/testcase/js/create.js +++ b/module/testcase/js/create.js @@ -156,4 +156,29 @@ $(function() }); $('#subNavbar li[data-id="testcase"]').addClass('active'); + + $('#customField').click(function() + { + disabledRequireFields(); + }); + + $('#formSettingForm .btn-primary').click(function() + { + $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); + var fields = ''; + $('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function() + { + fields += ',' + $(this).val(); + }); + + var link = createLink('custom', 'ajaxSaveCustomFields', 'module=testcase§ion=custom&key=createFields'); + $.post(link, {'fields' : fields}, function() + { + checkedShowFields(fields); + disabledRequireFields(); + $('#formSetting').parent().removeClass('open'); + }); + + return false; + }); }); diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index 54433855c8..62cd0d9170 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -21,6 +21,15 @@ app->tab);?> app->tab == 'execution') js::set('objectID', $executionID);?> app->tab == 'project') js::set('objectID', $projectID);?> +testcase->create->requiredFields);?> +testcase->custom->createFields) as $field) +{ + if(empty($field)) continue; + $fieldName = 'show' . ucfirst($field); + ${$fieldName} = strpos(",$showFields,", $field) !== false ? " {$field}Box" : "{$field}Box hidden"; +} +?>
@@ -67,17 +76,14 @@
testcase->typeList['unit']);?> - - - - - + -
task->story;?> task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?> @@ -110,7 +112,6 @@
task->datePlan;?>
- - estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");?> - - - ~ - - - deadline, "class='form-control form-date' placeholder='{$lang->task->deadline}'");?> - + estStarted, "class='form-control form-date $hiddenEstStarted estStartedBox' placeholder='{$lang->task->estStarted}'");?> + + ~ + deadline, "class='form-control form-date $hiddenDeadline deadlineBox' placeholder='{$lang->task->deadline}'");?>
story->mailto;?>
@@ -262,7 +255,6 @@
task->afterSubmit;?>testcase->type;?> testcase->typeList, $type, "class='form-control chosen'");?> +
testcase->stage?> testcase->stageList, $stage, "class='form-control chosen' multiple='multiple'");?>
testcase->lblStory;?>
@@ -93,7 +99,6 @@
testcase->title;?> @@ -108,8 +113,7 @@ - - testcase->pri;?> + testcase->pri;?> testcase->priList as $priKey => $priValue) @@ -129,10 +133,10 @@ } ?> - + -
+
@@ -141,7 +145,6 @@
- testcase->forceNotReview()):?> testcase->forceNotReview, '', "id='forceNotReview0'");?> @@ -220,12 +223,10 @@
- - + testcase->keywords;?> - testcase->status;?> From 12fd7102a1318694f65dcd4611502489f75c80f5 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 28 Jun 2022 17:55:19 +0800 Subject: [PATCH 04/40] * Finish task #58556. --- module/bug/js/batchcreate.js | 89 +++++++++++++++++++++++ module/bug/view/batchcreate.html.php | 101 ++++++++++++++------------- 2 files changed, 140 insertions(+), 50 deletions(-) diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index ca5552b022..3f496d94de 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -4,8 +4,97 @@ $(function() var $titleCol = $('#batchCreateForm table thead tr th.c-title'); if($titleCol.width() < 150) $titleCol.width(150); + + $('#customField').click(function() + { + disabledRequireFields(); + }); + + $('#formSettingForm .btn-primary').click(function() + { + $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); + var fields = ''; + $('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function() + { + fields += ',' + $(this).val(); + }); + + var link = createLink('custom', 'ajaxSaveCustomFields', 'module=bug§ion=custom&key=batchCreateFields'); + $.post(link, {'fields' : fields}, function() + { + checkedShowFields(fields); + disabledRequireFields(); + var $titleCol = $('#batchCreateForm table thead tr th.c-title'); + if($titleCol.width() < 150) $titleCol.width(150); + $('#formSetting').parent().removeClass('open'); + }); + + return false; + }); }) +/** + * Checked show fields. + * + * @param string fields + * @access public + * @return void + */ +function checkedShowFields(fields) +{ + var fieldList = ',' + fields + ','; + var checkedCount = $('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').length; + if(checkedCount > 5) + { + $('.table-responsive').removeClass('scroll-none'); + $('.table-responsive').css('overflow', 'auto'); + } + else + { + $('.table-responsive').addClass('scroll-none'); + $('.table-responsive').css('overflow', 'visible'); + } + + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var required = ',' + requiredFields + ','; + var $fieldBox = $('.' + $(this).val() + 'Box' ); + if(fieldList.indexOf(field) >= 0 || required.indexOf(field) >= 0) + { + + if(fieldList.indexOf(field) >= 0) $(this).attr('checked', true); + $fieldBox.removeClass('hidden'); + } + else + { + if(!$fieldBox.hasClass('hidden')) $fieldBox.addClass('hidden'); + } + + var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length; + if(fieldCount < 4) + { + $('#batchCreateForm table thead tr th.c-title').css('width', 'auto'); + } + }); +} + +/** + * Disabled require field. + * + * @access public + * @return void + */ +function disabledRequireFields() +{ + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var required = ',' + requiredFields + ','; + if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled'); + }); +} + /** * Set opened builds. * diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 91c02ab591..41770dfd40 100755 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -14,6 +14,24 @@ include '../../common/view/header.html.php'; js::set('requiredFields', $config->bug->create->requiredFields); ?> +bug->create->requiredFields) as $field) +{ + if($field) + { + $requiredFields[$field] = ''; + if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = ''; + } +} +?> +

@@ -30,49 +48,32 @@ js::set('requiredFields', $config->bug->create->requiredFields);

- - bug->create->requiredFields) as $field) - { - if($field) - { - $requiredFields[$field] = ''; - if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = ''; - } - } - ?>
- + systemMode == 'new'):?> - + - + - - - - - - - - + + + + + + + + bug->getFlowExtendFields(); foreach($extendFields as $extendField) @@ -107,12 +108,12 @@ js::set('requiredFields', $config->bug->create->requiredFields); ?> - + systemMode == 'new'):?> - + - + - - - - - - - - + + + + + + + + loadModel('flow'); foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . ""; @@ -161,12 +162,12 @@ js::set('requiredFields', $config->bug->create->requiredFields); ?> - + systemMode == 'new'):?> - + - + - - - - - - - - + + + + + + + + loadModel('flow'); foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . ""; From be78c78c4b9b0bdbf94baa3b958b09f650fab113 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 28 Jun 2022 18:08:59 +0800 Subject: [PATCH 05/40] * Restore code. --- module/testcase/view/create.html.php | 29 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index 62cd0d9170..54433855c8 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -21,15 +21,6 @@ app->tab);?> app->tab == 'execution') js::set('objectID', $executionID);?> app->tab == 'project') js::set('objectID', $projectID);?> -testcase->create->requiredFields);?> -testcase->custom->createFields) as $field) -{ - if(empty($field)) continue; - $fieldName = 'show' . ucfirst($field); - ${$fieldName} = strpos(",$showFields,", $field) !== false ? " {$field}Box" : "{$field}Box hidden"; -} -?>
@@ -76,14 +67,17 @@ foreach(explode(',', $config->testcase->custom->createFields) as $field)
testcase->typeList['unit']);?> - + - + + +
idAB;?>'> product->branch;?> branchBox'> product->branch;?> '> bug->module;?> '>model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->project;?> projectBox'>model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->project;?> '>model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?> executionBox'>model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?> bug->openedBuild;?> bug->title;?> kanbancard->region;?> kanbancard->lane;?> '>bug->deadline;?>'>bug->steps;?>'>typeAB;?>'>bug->pri;?>'>bug->severity;?>'>bug->os;?>'>bug->browser;?>'>bug->keywords;?> deadlineBox'>bug->deadline;?> stepsBox'>bug->steps;?> typeBox'>typeAB;?> priBox'>bug->pri;?> severityBox'>bug->severity;?> osBox'>bug->os;?> browserBox'>bug->browser;?> keywordsBox'>bug->keywords;?>
' style='overflow:visible'> branchBox' style='overflow:visible'> ' style='overflow:visible'> projectBox' style='overflow:visible'> ' style='overflow:visible'> executionBox' style='overflow:visible'>
@@ -132,14 +133,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
'>'>' style='overflow:visible'> bug->typeList, $type, "class='form-control chosen'");?>' style='overflow:visible'> bug->priList, $pri, "class='form-control'");?>' style='overflow:visible'>bug->severityList, '3', "class='form-control'");?>' style='overflow:visible'> bug->osList, $os, "class='form-control chosen'");?>' style='overflow:visible'> bug->browserList, $browser, "class='form-control chosen'");?>'> deadlineBox'> stepsBox'> typeBox' style='overflow:visible'> bug->typeList, $type, "class='form-control chosen'");?> priBox' style='overflow:visible'> bug->priList, $pri, "class='form-control'");?> severityBox' style='overflow:visible'>bug->severityList, '3', "class='form-control'");?> osBox' style='overflow:visible'> bug->osList, $os, "class='form-control chosen'");?> browserBox' style='overflow:visible'> bug->browserList, $browser, "class='form-control chosen'");?> keywordsBox'>
' style='overflow:visible'> branchBox' style='overflow:visible'> ' style='overflow:visible'> projectBox' style='overflow:visible'> ' style='overflow:visible'> executionBox' style='overflow:visible'>
@@ -186,14 +187,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
'>'>' style='overflow:visible'> bug->typeList, $type, "class='form-control chosen'");?>' style='overflow:visible'> bug->priList, $pri, "class='form-control'");?>' style='overflow:visible'>bug->severityList, '3', "class='form-control'");?>' style='overflow:visible'> bug->osList, $os, "class='form-control chosen'");?>' style='overflow:visible'> bug->browserList, $browser, "class='form-control chosen'");?>'> deadlineBox'> stepsBox'> typeBox' style='overflow:visible'> bug->typeList, $type, "class='form-control chosen'");?> priBox' style='overflow:visible'> bug->priList, $pri, "class='form-control'");?> severityBox' style='overflow:visible'>bug->severityList, '3', "class='form-control'");?> osBox' style='overflow:visible'> bug->osList, $os, "class='form-control chosen'");?> browserBox' style='overflow:visible'> bug->browserList, $browser, "class='form-control chosen'");?> keywordsBox'> testcase->type;?> testcase->typeList, $type, "class='form-control chosen'");?> + +
testcase->stage?> testcase->stageList, $stage, "class='form-control chosen' multiple='multiple'");?>
testcase->lblStory;?>
@@ -99,6 +93,7 @@ foreach(explode(',', $config->testcase->custom->createFields) as $field)
testcase->title;?> @@ -113,7 +108,8 @@ foreach(explode(',', $config->testcase->custom->createFields) as $field) - testcase->pri;?> + + testcase->pri;?> testcase->priList as $priKey => $priValue) @@ -133,10 +129,10 @@ foreach(explode(',', $config->testcase->custom->createFields) as $field) } ?> - + -
+
@@ -145,6 +141,7 @@ foreach(explode(',', $config->testcase->custom->createFields) as $field)
+ testcase->forceNotReview()):?> testcase->forceNotReview, '', "id='forceNotReview0'");?> @@ -223,10 +220,12 @@ foreach(explode(',', $config->testcase->custom->createFields) as $field)
- + + testcase->keywords;?> + testcase->status;?> From 9f25fc251b50d108a25ed8fb6e1ee33b60d4af98 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 29 Jun 2022 14:39:19 +0800 Subject: [PATCH 06/40] * Fix bug #24090. --- extension/lite/product/ext/view/browse.html.php | 3 ++- module/product/view/browse.html.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extension/lite/product/ext/view/browse.html.php b/extension/lite/product/ext/view/browse.html.php index 8f2c6f2f93..4b5b79ac3e 100644 --- a/extension/lite/product/ext/view/browse.html.php +++ b/extension/lite/product/ext/view/browse.html.php @@ -17,6 +17,7 @@ body {margin-bottom: 25px;} #mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text {color: #fff;} #mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;} .body-modal #mainMenu>.btn-toolbar {width: auto;} +.assignedTo{border-radius: 4px !important;} @@ -411,7 +412,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
- + 10; $actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID"); diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 5b5d49809f..249c0bacac 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -17,6 +17,7 @@ body {margin-bottom: 25px;} #mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text {color: #fff;} #mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;} .body-modal #mainMenu>.btn-toolbar {width: auto;} +.assignedTo{border-radius: 4px !important;} @@ -550,7 +551,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
- + 10; $actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID"); From 5fa46a77fe3e2556d05cbfe382f0e94c38da5fb6 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 29 Jun 2022 15:32:19 +0800 Subject: [PATCH 07/40] * Fix bug #24132. --- .../workflowdatasource/ext/config/litevip.php | 2 ++ .../workflowdatasource/ext/model/getlist.php | 19 +++++++++++++++++++ .../ext/view/browse.flow.html.hook.php | 1 - .../ext/view/create.flow.html.hook.php | 1 - .../ext/view/edit.flow.html.hook.php | 1 - 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 extension/lite/workflowdatasource/ext/config/litevip.php create mode 100644 extension/lite/workflowdatasource/ext/model/getlist.php diff --git a/extension/lite/workflowdatasource/ext/config/litevip.php b/extension/lite/workflowdatasource/ext/config/litevip.php new file mode 100644 index 0000000000..1026608ae5 --- /dev/null +++ b/extension/lite/workflowdatasource/ext/config/litevip.php @@ -0,0 +1,2 @@ +config->workflowdatasource->excludeDatasource = 'litefeedbackStatus,litefeedbackModules,litefeedbackType,litefeedbackSolution,litefeedbackclosedReason'; diff --git a/extension/lite/workflowdatasource/ext/model/getlist.php b/extension/lite/workflowdatasource/ext/model/getlist.php new file mode 100644 index 0000000000..e352913fb7 --- /dev/null +++ b/extension/lite/workflowdatasource/ext/model/getlist.php @@ -0,0 +1,19 @@ +dao->select('*')->from(TABLE_WORKFLOWDATASOURCE) + ->where(1) + ->beginIF(!empty($this->config->vision))->andWhere('vision')->eq($this->config->vision)->fi() + ->beginIF($this->config->visions == ',lite,')->andWhere('code')->notin($this->config->workflowdatasource->excludeDatasource)->fi() + ->orderBy($orderBy) + ->page($pager) + ->fetchAll(); +} diff --git a/extension/lite/workflowdatasource/ext/view/browse.flow.html.hook.php b/extension/lite/workflowdatasource/ext/view/browse.flow.html.hook.php index e029265b5e..e69de29bb2 100644 --- a/extension/lite/workflowdatasource/ext/view/browse.flow.html.hook.php +++ b/extension/lite/workflowdatasource/ext/view/browse.flow.html.hook.php @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowdatasource/ext/view/create.flow.html.hook.php b/extension/lite/workflowdatasource/ext/view/create.flow.html.hook.php index 55d057a936..fefcab51f4 100644 --- a/extension/lite/workflowdatasource/ext/view/create.flow.html.hook.php +++ b/extension/lite/workflowdatasource/ext/view/create.flow.html.hook.php @@ -3,4 +3,3 @@ $('#submit').after(' -app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowdatasource/ext/view/edit.flow.html.hook.php b/extension/lite/workflowdatasource/ext/view/edit.flow.html.hook.php index e029265b5e..e69de29bb2 100644 --- a/extension/lite/workflowdatasource/ext/view/edit.flow.html.hook.php +++ b/extension/lite/workflowdatasource/ext/view/edit.flow.html.hook.php @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?> From 834245e103c7dad143a8c64be280323ca1e5674e Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 29 Jun 2022 16:06:54 +0800 Subject: [PATCH 08/40] * Fix bug #24437. --- module/block/view/waterfallissueblock.html.php | 6 ++++-- module/block/view/waterfallriskblock.html.php | 14 ++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/module/block/view/waterfallissueblock.html.php b/module/block/view/waterfallissueblock.html.php index 3cd26cb27d..7f4ca97119 100644 --- a/module/block/view/waterfallissueblock.html.php +++ b/module/block/view/waterfallissueblock.html.php @@ -5,6 +5,8 @@ .block-issues .c-id {width: 55px;} .block-issues .c-status {width: 80px;} .block-issues.block-sm .c-status {text-align: center;} +.c-assignedTo {width: 100px; padding:0px !important;text-align:center;} +.c-severity, .c-pri {text-align:center;}
'> @@ -17,7 +19,7 @@ - + @@ -35,7 +37,7 @@ - + $value) { - $this->story->printCell($value, $story, $users, '', $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', '', $execution, $showBranch); + $this->story->printCell($value, $story, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', '', $execution, $showBranch); } ?> diff --git a/module/story/model.php b/module/story/model.php index 605f04d858..ef2fa2bc59 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4344,6 +4344,7 @@ class storyModel extends model echo ""; break; case 'title': + $showBranch = 0; if($tab == 'project') { $showBranch = isset($this->config->projectstory->story->showBranch) ? $this->config->projectstory->story->showBranch : 1; From 31dda1ebb8a076b5cc0c7db7181cf15104a5f3aa Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 4 Jul 2022 08:16:34 +0800 Subject: [PATCH 20/40] * Fix bug #24686. --- module/user/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/user/control.php b/module/user/control.php index 82c0715acb..07a92fe8ed 100755 --- a/module/user/control.php +++ b/module/user/control.php @@ -969,7 +969,7 @@ class user extends control } else { - $loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == '/' or $this->referer == '/zentao/' or empty($this->referer)); + $loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == '/' or $this->referer == '/zentao/' or $this->referer == '/biz/' or empty($this->referer)); $this->loadModel('misc'); $this->loadModel('extension'); From 7e612e94c6a84cf1560495d01cefba6ba03862ab Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Mon, 4 Jul 2022 00:17:43 +0000 Subject: [PATCH 21/40] * Fix bug #24681. --- module/block/view/productstatisticblock.html.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/block/view/productstatisticblock.html.php b/module/block/view/productstatisticblock.html.php index 8da697047a..67e8ca90b2 100644 --- a/module/block/view/productstatisticblock.html.php +++ b/module/block/view/productstatisticblock.html.php @@ -127,10 +127,10 @@ $(function()
SRCommon;?>
stories):?>
stories);?>
- id}&branch=&type=allstory", $lang->story->viewAll . '', '', 'class="btn btn-primary btn-circle btn-icon-right btn-sm"');?> + id}&branch=&type=allstory", $lang->story->viewAll . '', '', 'class="btn btn-primary btn-circle btn-icon-right btn-sm" data-app="product"');?>
0
- id}", '' . $lang->story->create, '', 'class="btn btn-primary btn-circle btn-icon-left btn-sm"');?> + id}", '' . $lang->story->create, '', 'class="btn btn-primary btn-circle btn-icon-left btn-sm" data-app="product"');?>
    @@ -157,7 +157,7 @@ $(function()
    - id}", " " . $lang->productplan->create, '', "class='btn btn-info'");?> + id}", " " . $lang->productplan->create, '', "class='btn btn-info' data-app='product'");?>
    @@ -190,7 +190,7 @@ $(function()
    - id}", " " . $lang->release->create, '', "class='btn btn-info'");?> + id}", " " . $lang->release->create, '', "class='btn btn-info' data-app='product'");?>
    From 2b644837a0f1b623a0b75a9741f0471559f79524 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Mon, 4 Jul 2022 00:30:07 +0000 Subject: [PATCH 22/40] * Fix bug #23596. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index ef2fa2bc59..df05c22450 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4344,13 +4344,13 @@ class storyModel extends model echo ""; break; case 'title': - $showBranch = 0; if($tab == 'project') { $showBranch = isset($this->config->projectstory->story->showBranch) ? $this->config->projectstory->story->showBranch : 1; } elseif($tab == 'execution') { + $showBranch = 0; if($isShowBranch) $showBranch = isset($this->config->execution->story->showBranch) ? $this->config->execution->story->showBranch : 1; } else From 7f9f5f662c6694fcea969e288b91e94958e0c659 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 4 Jul 2022 11:21:56 +0800 Subject: [PATCH 23/40] * Finish task #59468. --- module/task/js/finish.js | 18 +++++++++++++++++- module/task/lang/de.php | 3 ++- module/task/lang/en.php | 3 ++- module/task/lang/fr.php | 1 + module/task/lang/zh-cn.php | 3 ++- module/task/model.php | 2 +- module/task/view/finish.html.php | 4 +++- 7 files changed, 28 insertions(+), 6 deletions(-) diff --git a/module/task/js/finish.js b/module/task/js/finish.js index c3778fa0a1..413deb8e2c 100644 --- a/module/task/js/finish.js +++ b/module/task/js/finish.js @@ -8,5 +8,21 @@ $(function() totalConsumed = Math.round(totalConsumed * 1000) / 1000; $('#totalConsumed').html(totalConsumed); $('#consumed').val(totalConsumed); - }) + }) + + $('#submit').click(function() + { + if(task.consumed != 0 && $('#currentConsumed').val() == 0) + { + var msg = consumedEmpty; + if(confirm(msg) == true) + { + return true; + } + else + { + return false; + } + } + }) }) diff --git a/module/task/lang/de.php b/module/task/lang/de.php index 88cf40134f..137364c86d 100644 --- a/module/task/lang/de.php +++ b/module/task/lang/de.php @@ -252,7 +252,8 @@ $lang->task->error->skipClose = 'Aufgabe: %s ist nicht “Erledigt” od $lang->task->error->closeParent = 'Task: %s is the Parent Task, which is automatically closed after all subtasks under the Parent Task are closed and cannot be closed manually.'; $lang->task->error->consumed = 'Aufgabe: %s Hour must be more than 0. Ignore changes to this Task.'; $lang->task->error->assignedTo = 'Mehere Tasks können nicht zugewisen werden, da die Benutzer nicht teil des Teams sind.'; -$lang->task->error->consumedEmpty = '"Current Cost" should not be 0.'; +$lang->task->error->consumedEmpty = 'Cannot finish the task with 0 "Total Cost", please enter "Current Cost".'; +$lang->task->error->consumedEmptyAB = '"Current Cost" is 0, please confirm whether you submit.'; $lang->task->error->deadlineSmall = '"Deadline" must be greater than "StartDate".'; $lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.'; $lang->task->error->realStartedEmpty = '"Real Started" should not be empty.'; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index 0e9301092b..ab272e262c 100755 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -252,7 +252,8 @@ $lang->task->error->skipClose = 'Task: %s is not “Finished” or “Ca $lang->task->error->closeParent = 'Task: %s is the Parent Task, which is automatically closed after all subtasks under the Parent Task are closed and cannot be closed manually.'; $lang->task->error->consumed = 'Task: %s hour must be < 0. Ignore changes to this task.'; $lang->task->error->assignedTo = 'Multi-user task in the current status cannot be assigned to a member who is not in the task team.'; -$lang->task->error->consumedEmpty = '"Current Cost" should not be 0.'; +$lang->task->error->consumedEmpty = 'Cannot finish the task with 0 "Total Cost", please enter "Current Cost".'; +$lang->task->error->consumedEmptyAB = '"Current Cost" is 0, please confirm whether you submit.'; $lang->task->error->deadlineSmall = '"Deadline" must be greater than "StartDate".'; $lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.'; $lang->task->error->realStartedEmpty = '"Real Started" should not be empty.'; diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php index ff908e7e49..40775b38bd 100644 --- a/module/task/lang/fr.php +++ b/module/task/lang/fr.php @@ -253,6 +253,7 @@ $lang->task->error->closeParent = 'Task: %s is the Parent Task, which is a $lang->task->error->consumed = 'Tâche: %s heures doivent être < 0. Ignorer changements de cette tâche.'; $lang->task->error->assignedTo = "Tâche Multi-user dans le statut courant ne peut pas être assignée à un membre qui ne fait pas partie de l'équipe."; $lang->task->error->consumedEmpty = '"Coût Actuel" ne devrait pas être 0.'; +$lang->task->error->consumedEmptyAB = '"Current Cost" is 0, please confirm whether you submit.'; $lang->task->error->deadlineSmall = '"Date Limite" doit être supérieur à la "Date de Départ".'; $lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.'; $lang->task->error->realStartedEmpty = '"Real Started" should not be empty.'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 06ddc2a7f5..c7a13670fa 100755 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -252,7 +252,8 @@ $lang->task->error->skipClose = '任务:%s 不是“已完成”或“ $lang->task->error->closeParent = '任务:%s 是父任务,父任务在所有子任务关闭后会自动关闭,无法手动关闭。'; $lang->task->error->consumed = '任务:%s工时不能小于0,忽略该任务工时的改动'; $lang->task->error->assignedTo = '当前状态的多人任务不能指派给任务团队外的成员。'; -$lang->task->error->consumedEmpty = '"本次消耗"不能为0'; +$lang->task->error->consumedEmpty = '总计消耗为0时不能完成任务,请填写本次消耗工时'; +$lang->task->error->consumedEmptyAB = '"本次消耗"为0,请确认是否提交。'; $lang->task->error->deadlineSmall = '"截止日期"必须大于"预计开始"'; $lang->task->error->alreadyStarted = '此任务已被启动,不能重复启动!'; $lang->task->error->realStartedEmpty = '实际开始不能为空'; diff --git a/module/task/model.php b/module/task/model.php index 80ec3d883b..46ced4a586 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1879,7 +1879,7 @@ class taskModel extends model return false; } - if(empty($currentConsumed)) + if(empty($currentConsumed) and $oldTask->consumed == '0') { dao::$errors[] = $this->lang->task->error->consumedEmpty; return false; diff --git a/module/task/view/finish.html.php b/module/task/view/finish.html.php index 6c855dff64..2ca48a2d6e 100644 --- a/module/task/view/finish.html.php +++ b/module/task/view/finish.html.php @@ -13,6 +13,8 @@ + +task->error->consumedEmptyAB);?>
    team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?> @@ -59,7 +61,7 @@
- +
issue->severity;?> issue->pri;?> issue->owner;?>issue->assignedTo;?>issue->assignedTo;?> issue->status;?>
issue->severityList, $issue->severity, $issue->severity)?> issue->priList, $issue->pri, $issue->pri)?> owner, $issue->owner)?>assignedTo, $issue->assignedTo)?>assignedTo, $issue->assignedTo)?> issue->statusList, $issue->status);?> diff --git a/module/block/view/waterfallriskblock.html.php b/module/block/view/waterfallriskblock.html.php index a0c407cc07..47e4e9af30 100644 --- a/module/block/view/waterfallriskblock.html.php +++ b/module/block/view/waterfallriskblock.html.php @@ -3,9 +3,11 @@ From 76b79da0c1a66a154a277c5499bb72aec7374b23 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 30 Jun 2022 15:20:38 +0800 Subject: [PATCH 14/40] * fix bug #23996 --- module/caselib/view/showimport.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/caselib/view/showimport.html.php b/module/caselib/view/showimport.html.php index 848ae78c6a..61561bae22 100644 --- a/module/caselib/view/showimport.html.php +++ b/module/caselib/view/showimport.html.php @@ -128,7 +128,8 @@ $(function() diff --git a/module/story/model.php b/module/story/model.php index a667e0c34f..c15daa31ea 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3844,13 +3844,11 @@ class storyModel extends model if(common::canBeChanged('story', $story)) { $storyReviewer = isset($story->reviewer) ? $story->reviewer : array(); - if($story->URChanged) return $this->buildMenu('story', 'processStoryChange', $params, $story, $type, 'search', '', 'iframe', true, '', $this->lang->confirm); $isClick = $this->isClickable($story, 'change'); $title = $isClick ? '' : $this->lang->story->changeTip; - $menu .= $this->buildMenu('story', 'change', $params . "&from=$story->from", $story, $type, 'alter', '', '', false, '', $title); - + $menu .= $this->buildMenu('story', 'change', $params . "&from=$story->from", $story, $type, 'alter', '', 'showinonlybody', false, '', $title); $isClick = $this->isClickable($story, 'review'); $title = $this->lang->story->review; if(!$isClick) @@ -3872,8 +3870,7 @@ class storyModel extends model $title = $this->lang->story->reviewTip['recalled']; } } - $menu .= $this->buildMenu('story', 'review', $params . "&from=$story->from", $story, $type, 'search', '', '', false, '', $title); - + $menu .= $this->buildMenu('story', 'review', $params . "&from=$story->from", $story, $type, 'search', '', 'showinonlybody', false, '', $title); $title = $this->lang->story->recall; $isClick = $this->isClickable($story, 'recall'); if(!$isClick) @@ -3883,11 +3880,11 @@ class storyModel extends model if(empty($story->reviewedBy) and strpos('draft,changed', $story->status) !== false and !empty($story->reviewer) and $this->app->user->account != $story->openedBy) $title = $this->lang->story->recallTip['notOpenedBy']; if($story->status == 'active' and empty($story->reviewer)) $title = $this->lang->story->recallTip['actived']; } - $menu .= $this->buildMenu('story', 'recall', $params, $story, $type, 'undo', 'hiddenwin', '', '', '', $title); + $menu .= $this->buildMenu('story', 'recall', $params, $story, $type, 'undo', 'hiddenwin', 'showinonlybody', '', '', $title); $menu .= $this->buildMenu('story', 'close', $params, $story, $type, '', '', 'iframe', true); - $menu .= $this->buildMenu('story', 'edit', $params . "&from=$story->from", $story, $type); - if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$params", $story, $type, 'sitemap', '', '', false, "data-app='qa'"); + $menu .= $this->buildMenu('story', 'edit', $params . "&from=$story->from", $story, $type, '', '', 'showinonlybody'); + if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$params", $story, $type, 'sitemap', '', 'showinonlybody', false, "data-app='qa'"); if($this->app->rawModule != 'projectstory' OR $this->config->vision == 'lite') { @@ -3906,9 +3903,10 @@ class storyModel extends model if($story->stage == 'projected') $title = $this->lang->story->subDivideTip['projected']; } } - $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID={$this->session->project}", $story, $type, 'split', '', '', '', '', $title); + $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID={$this->session->project}", $story, $type, 'split', '', 'showinonlybody', '', '', $title); } - if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin'); + if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin', 'showinonlybody'); + } else { From dd30f6354b3086b988bca918f245f30f3762345b Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Fri, 1 Jul 2022 11:28:58 +0800 Subject: [PATCH 18/40] * fix bug #24071 --- extension/lite/product/ext/view/browse.lite.html.hook.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/extension/lite/product/ext/view/browse.lite.html.hook.php b/extension/lite/product/ext/view/browse.lite.html.hook.php index d7ac1acc67..df267790ba 100644 --- a/extension/lite/product/ext/view/browse.lite.html.hook.php +++ b/extension/lite/product/ext/view/browse.lite.html.hook.php @@ -1,7 +1,3 @@ From c568a467442441d8c0e5d1c7f2e1a598d31e4ce7 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Fri, 1 Jul 2022 07:20:01 +0000 Subject: [PATCH 19/40] * Fix bug #22964. --- module/execution/control.php | 11 ++++++++++- module/execution/view/story.html.php | 2 +- module/story/model.php | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index b509ca3f4f..8313194d83 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -805,6 +805,14 @@ class execution extends control } $actionURL = $this->createLink('execution', 'story', "executionID=$executionID&orderBy=$orderBy&type=bySearch&queryID=myQueryID"); $branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products)); + $branchOption = array(); + foreach($branchGroups as $productID => $branches) + { + foreach($branches as $branchID => $name) + { + $branchOption[$branchID] = $name; + } + } $this->execution->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, 'executionStory', $executionID); /* Header and position. */ @@ -867,9 +875,10 @@ class execution extends control $this->view->pager = $pager; $this->view->setModule = true; $this->view->branchGroups = $branchGroups; + $this->view->branchOption = $branchOption; $this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable. $this->view->showBranch = $showBranch; - $this->view->storyStages = $this->product->batchGetStoryStage($stories); + $this->view->storyStages = $this->product->batchGetStoryStage($stories); $this->display(); } diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index 0dd2137ebb..933e131229 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -231,7 +231,7 @@
team) ? $lang->task->consumed : $lang->task->myConsumed;?> team) ? $task->consumed : (float)$task->myConsumed;?> - " . (float)$consumed . " " . $lang->workingHour . html::hidden('consumed', $consumed); js::set('consumed', $consumed); ?> From 89f5ead39cf5037736a5d2a739f123c000de4757 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 4 Jul 2022 11:28:49 +0800 Subject: [PATCH 24/40] * Modify French language items. --- module/task/lang/fr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php index 40775b38bd..555df916b6 100644 --- a/module/task/lang/fr.php +++ b/module/task/lang/fr.php @@ -252,8 +252,8 @@ $lang->task->error->skipClose = 'Tâche: %s non “Finie” ou “Annul $lang->task->error->closeParent = 'Task: %s is the Parent Task, which is automatically closed after all subtasks under the Parent Task are closed and cannot be closed manually.'; $lang->task->error->consumed = 'Tâche: %s heures doivent être < 0. Ignorer changements de cette tâche.'; $lang->task->error->assignedTo = "Tâche Multi-user dans le statut courant ne peut pas être assignée à un membre qui ne fait pas partie de l'équipe."; -$lang->task->error->consumedEmpty = '"Coût Actuel" ne devrait pas être 0.'; -$lang->task->error->consumedEmptyAB = '"Current Cost" is 0, please confirm whether you submit.'; +$lang->task->error->consumedEmpty = 'Lorsque la "Coût Total" est de 0, la tâche ne peut pas être terminée. Veuillez d\'abord remplir "Coût Actuel".'; +$lang->task->error->consumedEmptyAB = '"Coût Actuel" est de 0, veuillez confirmer si vous souhaitez continuer à soumettre.'; $lang->task->error->deadlineSmall = '"Date Limite" doit être supérieur à la "Date de Départ".'; $lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.'; $lang->task->error->realStartedEmpty = '"Real Started" should not be empty.'; From ee701c75c9de06237cdfb9db86327967febf09f2 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 4 Jul 2022 13:20:09 +0800 Subject: [PATCH 25/40] * Finish task #58554. --- module/task/css/batchcreate.css | 2 +- module/task/js/batchcreate.js | 12 ++++++++---- module/task/js/common.js | 15 ++++++++------- module/task/js/create.js | 4 +--- module/task/view/batchcreate.html.php | 2 +- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/module/task/css/batchcreate.css b/module/task/css/batchcreate.css index 0469aab8d1..43d589faab 100644 --- a/module/task/css/batchcreate.css +++ b/module/task/css/batchcreate.css @@ -12,7 +12,7 @@ select[id^="story"] + .picker-single {width: 130px; max-width: 130px;} #zeroTaskStory {margin: 0 0 0 20px; height: 32px; padding: 5px 5px 5px 5px; border-radius: 3px; border: 2px solid transparent;} #zeroTaskStory > label:before {top: 7px; left: 5px;} -#zeroTaskStory > label:after {top: 5px; left: 5px;} +#zeroTaskStory > label:after {top: 7px; left: 5px;} #zeroTaskStory.checked {border-color: #00a9fc; background: #E9F2FB;} .chosen-results > li.has-task, diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index 9d68a3483c..12bc4b399f 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -2,18 +2,18 @@ $(function() { removeDitto(); - if($('th.c-name').width() < 200) $('th.c-name').width(200); + if($('th.c-name').width() < 165) $('th.c-name').width(165); if(taskConsumed > 0) bootbox.alert(addChildTask); $('#customField').on('click', function(){$('#tableBody .chosen-with-drop').removeClass('chosen-with-drop chosen-container-active')}); $('#customField').click(function() { - disabledRequireFields(); + hiddenRequireFields(); }); + /* Implement a custom form without feeling refresh. */ $('#formSettingForm .btn-primary').click(function() { - $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); var fields = ''; $('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function() { @@ -24,8 +24,12 @@ $(function() $.post(link, {'fields' : fields}, function() { checkedShowFields(fields); - disabledRequireFields(); $('#formSetting').parent().removeClass('open'); + + var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length; + $('.form-actions').attr('colspan', fieldCount); + + if($('th.c-name').width() < 165) $('th.c-name').width(165); }); return false; diff --git a/module/task/js/common.js b/module/task/js/common.js index 8556c357e9..8e21cea27c 100644 --- a/module/task/js/common.js +++ b/module/task/js/common.js @@ -33,16 +33,17 @@ function checkedShowFields(fields) $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() { var field = ',' + $(this).val() + ','; + var $field = $('#' + $(this).val()); var $fieldBox = $('.' + $(this).val() + 'Box' ); if(fieldList.indexOf(field) >= 0) { - - $(this).attr('checked', true); $fieldBox.removeClass('hidden'); + $field.removeAttr('disabled'); } - else + else if(!$fieldBox.hasClass('hidden')) { - if(!$fieldBox.hasClass('hidden')) $fieldBox.addClass('hidden'); + $fieldBox.addClass('hidden'); + $field.attr('disabled', true); } }); @@ -66,17 +67,17 @@ function checkedShowFields(fields) } /** - * Disabled require field. + * Hidden require field. * * @access public * @return void */ -function disabledRequireFields() +function hiddenRequireFields() { $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() { var field = ',' + $(this).val() + ','; var required = ',' + requiredFields + ','; - if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled'); + if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden'); }); } diff --git a/module/task/js/create.js b/module/task/js/create.js index c187786901..d656899e8f 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -2,12 +2,11 @@ $(function() { $('#customField').click(function() { - disabledRequireFields(); + hiddenRequireFields(); }); $('#formSettingForm .btn-primary').click(function() { - $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); var fields = ''; $('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function() { @@ -18,7 +17,6 @@ $(function() $.post(link, {'fields' : fields}, function() { checkedShowFields(fields); - disabledRequireFields(); $('#formSetting').parent().removeClass('open'); }); diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 26c152c7b4..7430395279 100755 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -115,7 +115,7 @@ $colspan = count($visibleFields) + 3; ?>
From fedefaf02bb125b2fad1ea4975d31915f81e5976 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 4 Jul 2022 13:20:33 +0800 Subject: [PATCH 26/40] * Finish task #58554. --- module/common/view/customfield.html.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/module/common/view/customfield.html.php b/module/common/view/customfield.html.php index a1f24662b6..4af7a48a4f 100644 --- a/module/common/view/customfield.html.php +++ b/module/common/view/customfield.html.php @@ -17,9 +17,17 @@ #formSettingForm .checkbox-primary {width: 50%; float: left; margin: 3px 0;} #formSetting .btn {margin-right: 8px;} + rawModule; + $method = $app->rawMethod; + ?>