* Finish task #87013.

This commit is contained in:
liumengyi
2023-03-13 07:07:13 +00:00
parent e291cd91f5
commit 637b0912a7
13 changed files with 125 additions and 25 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ $config->admin->menuGroup['system'] = array('custom|mode', 'backup', 'cron',
$config->admin->menuGroup['company'] = array('dept', 'company', 'user', 'group', 'tutorial');
$config->admin->menuGroup['switch'] = array('admin|setmodule');
$config->admin->menuGroup['model'] = array('auditcl', 'stage', 'design', 'cmcl', 'reviewcl', 'custom|required', 'custom|set', 'custom|flow', 'custom|code', 'custom|percent','custom|estimate', 'custom|hours', 'subject', 'process', 'activity', 'zoutput', 'classify', 'holiday', 'reviewsetting');
$config->admin->menuGroup['feature'] = array('custom|set', 'custom|product', 'custom|execution', 'custom|required', 'custom|kanban', 'approvalflow', 'measurement', 'meetingroom', 'custom|browsestoryconcept', 'custom|kanban', 'sqlbuilder', 'report');
$config->admin->menuGroup['feature'] = array('custom|set', 'custom|product', 'custom|execution', 'custom|required', 'custom|kanban', 'approvalflow', 'measurement', 'meetingroom', 'custom|browsestoryconcept', 'custom|kanban', 'sqlbuilder', 'report', 'custom|limittaskdate');
$config->admin->menuGroup['template'] = array('custom|set', 'baseline');
$config->admin->menuGroup['message'] = array('mail', 'webhook', 'sms', 'message');
$config->admin->menuGroup['dev'] = array('dev', 'entry', 'editor');
+2 -2
View File
@@ -106,7 +106,7 @@ if(helper::hasFeature('waterfallplus')) $lang->admin->menuList->model['tabMenu']
$lang->admin->menuList->feature['subMenu']['my'] = array('link' => "{$lang->my->common}|custom|set|module=todo&field=priList", 'exclude' => 'set,required');
$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|required|module=product", 'exclude' => 'set,required', 'alias' => 'browsestoryconcept,product');
$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|required|module=execution", 'exclude' => 'required,set', 'alias' => 'execution');
$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|required|module=execution", 'exclude' => 'required,set', 'alias' => 'execution,limittaskdate');
$lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "{$lang->qa->common}|custom|required|module=bug", 'exclude' => 'set,required');
$lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "{$lang->kanban->common}|custom|kanban|");
$lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "{$lang->doc->common}|custom|required|module=doc", 'exclude' => 'required');
@@ -121,7 +121,7 @@ $lang->admin->menuList->feature['tabMenu']['product']['productplan'] = array('li
$lang->admin->menuList->feature['tabMenu']['product']['release'] = array('link' => "{$lang->release->common}|custom|required|module=release", 'exclude' => 'custom-required');
$lang->admin->menuList->feature['tabMenu']['execution']['execution'] = array('link' => "{$lang->execution->common}|custom|required|module=execution", 'links' => array("custom|execution|"), 'alias' => 'execution', 'exclude' => 'custom-required');
$lang->admin->menuList->feature['tabMenu']['execution']['task'] = array('link' => "{$lang->task->common}|custom|required|module=task", 'links' => array('custom|set|module=task&field=priList'), 'exclude' => 'custom-required');
$lang->admin->menuList->feature['tabMenu']['execution']['task'] = array('link' => "{$lang->task->common}|custom|required|module=task", 'links' => array('custom|set|module=task&field=priList', 'custom|limittaskdate'), 'alias' => 'limittaskdate','exclude' => 'custom-required');
$lang->admin->menuList->feature['tabMenu']['qa']['bug'] = array('link' => "{$lang->bug->common}|custom|required|module=bug", 'links' => array("custom|set|module=bug&field=priList"), 'exclude' => 'custom-required,custom-set');
$lang->admin->menuList->feature['tabMenu']['qa']['testcase'] = array('link' => "{$lang->testcase->common}|custom|required|module=testcase", 'links' => array("custom|set|module=testcase&field=priList"), 'exclude' => 'custom-required,custom-set');
+1 -1
View File
@@ -71,7 +71,7 @@ $config->custom->fieldList['doc'] = 'keywords,content';
$config->custom->fieldList['user']['create'] = 'dept,role,email,commiter';
$config->custom->fieldList['user']['edit'] = 'dept,role,email,commiter,skype,qq,mobile,phone,address,zipcode,dingding,slack,whatsapp,weixin';
$config->custom->notSetMethods = array('required', 'browsestoryconcept', 'product', 'role', 'execution');
$config->custom->notSetMethods = array('required', 'browsestoryconcept', 'product', 'role', 'execution', 'limittaskdate');
global $lang;
$config->custom->commonLang = array('$URCOMMON' => $lang->URCommon, '$SRCOMMON' => $lang->SRCommon, '$PRODUCTCOMMON' => $lang->productCommon, '$PROJECTCOMMON' => $lang->projectCommon, '$EXECUTIONCOMMON' => $lang->executionCommon);
+22
View File
@@ -914,4 +914,26 @@ class custom extends control
$this->view->restDay = zget($this->config->execution, 'restDay', 0);
$this->display();
}
/**
* Set whether the task begin and end date is limited to the execution begin and end date.
*
* @access public
* @return void
*/
public function limitTaskDate()
{
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.limitTaskDate', $this->post->limitTaskDate);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->custom->beginAndEndDate;
$this->view->position[] = $this->lang->custom->common;
$this->view->position[] = $this->view->title;
$this->view->module = 'task';
$this->display();
}
}
+2
View File
@@ -0,0 +1,2 @@
#limitTaskDateForm .c-name {width: 120px;}
#limitTaskDateForm .c-select {width: 350px;}
+2
View File
@@ -0,0 +1,2 @@
#limitTaskDateForm .c-name {width: 180px;}
#limitTaskDateForm .c-select {width: 440px;}
+11 -5
View File
@@ -61,6 +61,8 @@ $lang->custom->defaultProgram = 'Default program';
$lang->custom->modeManagement = 'Mode Management';
$lang->custom->percent = $lang->stage->percent;
$lang->custom->setPercent = "Enable or Disable {$lang->stage->percent}";
$lang->custom->beginAndEndDate = 'Begin & End';
$lang->custom->beginAndEndDateRange = 'The Range Of Begin & End';
$lang->custom->unitList['efficiency'] = 'Working Hours/';
$lang->custom->unitList['manhour'] = 'Man-hour/';
@@ -122,11 +124,12 @@ $lang->custom->story->fields['reviewResultList'] = 'Review Result';
$lang->custom->story->fields['review'] = 'Review Required';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['required'] = $lang->custom->required;
$lang->custom->task->fields['priList'] = 'Priority';
$lang->custom->task->fields['typeList'] = 'Type';
$lang->custom->task->fields['reasonList'] = 'Close Reason';
$lang->custom->task->fields['statusList'] = 'Status';
$lang->custom->task->fields['required'] = $lang->custom->required;
$lang->custom->task->fields['priList'] = 'Priority';
$lang->custom->task->fields['typeList'] = 'Type';
$lang->custom->task->fields['reasonList'] = 'Close Reason';
$lang->custom->task->fields['statusList'] = 'Status';
$lang->custom->task->fields['limitTaskDate'] = 'Begin & End';
$lang->custom->bug = new stdClass();
$lang->custom->bug->fields['required'] = $lang->custom->required;
@@ -324,3 +327,6 @@ $lang->custom->scrum->setConcept = 'Set concept';
$lang->custom->reviewRules['allpass'] = 'All passed';
$lang->custom->reviewRules['halfpass'] = 'More than half passed';
$lang->custom->limitTaskDate['0'] = 'Unlimited';
$lang->custom->limitTaskDate['1'] = 'Limited to the execution begin and end date range';
+11 -5
View File
@@ -61,6 +61,8 @@ $lang->custom->defaultProgram = 'Default program';
$lang->custom->modeManagement = 'Mode Management';
$lang->custom->percent = $lang->stage->percent;
$lang->custom->setPercent = "Enable or Disable {$lang->stage->percent}";
$lang->custom->beginAndEndDate = 'Begin & End';
$lang->custom->beginAndEndDateRange = 'The Range Of Begin & End';
$lang->custom->unitList['efficiency'] = 'Working Hours/';
$lang->custom->unitList['manhour'] = 'Man-hour/';
@@ -122,11 +124,12 @@ $lang->custom->story->fields['reviewResultList'] = 'Review Result';
$lang->custom->story->fields['review'] = 'Need Review';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['required'] = $lang->custom->required;
$lang->custom->task->fields['priList'] = 'Priority';
$lang->custom->task->fields['typeList'] = 'Type';
$lang->custom->task->fields['reasonList'] = 'Close Reason';
$lang->custom->task->fields['statusList'] = 'Status';
$lang->custom->task->fields['required'] = $lang->custom->required;
$lang->custom->task->fields['priList'] = 'Priority';
$lang->custom->task->fields['typeList'] = 'Type';
$lang->custom->task->fields['reasonList'] = 'Close Reason';
$lang->custom->task->fields['statusList'] = 'Status';
$lang->custom->task->fields['limitTaskDate'] = 'Begin & End';
$lang->custom->bug = new stdClass();
$lang->custom->bug->fields['required'] = $lang->custom->required;
@@ -324,3 +327,6 @@ $lang->custom->scrum->setConcept = 'Set concept';
$lang->custom->reviewRules['allpass'] = 'All passed';
$lang->custom->reviewRules['halfpass'] = 'More than half passed';
$lang->custom->limitTaskDate['0'] = 'Unlimited';
$lang->custom->limitTaskDate['1'] = 'Limited to the execution begin and end date range';
+11 -5
View File
@@ -61,6 +61,8 @@ $lang->custom->defaultProgram = 'Default program';
$lang->custom->modeManagement = 'Mode Management';
$lang->custom->percent = $lang->stage->percent;
$lang->custom->setPercent = "Enable or Disable {$lang->stage->percent}";
$lang->custom->beginAndEndDate = 'Begin & End';
$lang->custom->beginAndEndDateRange = 'The Range Of Begin & End';
$lang->custom->unitList['efficiency'] = 'Working Hours/';
$lang->custom->unitList['manhour'] = 'Man-hour/';
@@ -122,11 +124,12 @@ $lang->custom->story->fields['reviewResultList'] = 'Valider Résultats';
$lang->custom->story->fields['review'] = 'Validation Requise';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['required'] = $lang->custom->required;
$lang->custom->task->fields['priList'] = 'Priorité';
$lang->custom->task->fields['typeList'] = 'Type';
$lang->custom->task->fields['reasonList'] = 'Raison Fermeture';
$lang->custom->task->fields['statusList'] = 'Statut';
$lang->custom->task->fields['required'] = $lang->custom->required;
$lang->custom->task->fields['priList'] = 'Priorité';
$lang->custom->task->fields['typeList'] = 'Type';
$lang->custom->task->fields['reasonList'] = 'Raison Fermeture';
$lang->custom->task->fields['statusList'] = 'Statut';
$lang->custom->task->fields['limitTaskDate'] = 'Begin & End';
$lang->custom->bug = new stdClass();
$lang->custom->bug->fields['required'] = $lang->custom->required;
@@ -324,3 +327,6 @@ $lang->custom->scrum->setConcept = 'Set concept';
$lang->custom->reviewRules['allpass'] = 'All passed';
$lang->custom->reviewRules['halfpass'] = 'More than half passed';
$lang->custom->limitTaskDate['0'] = 'Unlimited';
$lang->custom->limitTaskDate['1'] = 'Limited to the execution begin and end date range';
+11 -5
View File
@@ -61,6 +61,8 @@ $lang->custom->defaultProgram = '默认项目集';
$lang->custom->modeManagement = '模式管理';
$lang->custom->percent = $lang->stage->percent;
$lang->custom->setPercent = "是否启用{$lang->stage->percent}";
$lang->custom->beginAndEndDate = '起止日期';
$lang->custom->beginAndEndDateRange = '起止日期范围';
$lang->custom->unitList['efficiency'] = '工时/';
$lang->custom->unitList['manhour'] = '人时/';
@@ -122,11 +124,12 @@ $lang->custom->story->fields['reviewResultList'] = '评审结果';
$lang->custom->story->fields['review'] = '评审流程';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['required'] = $lang->custom->required;
$lang->custom->task->fields['priList'] = '优先级';
$lang->custom->task->fields['typeList'] = '类型';
$lang->custom->task->fields['reasonList'] = '关闭原因';
$lang->custom->task->fields['statusList'] = '状态';
$lang->custom->task->fields['required'] = $lang->custom->required;
$lang->custom->task->fields['priList'] = '优先级';
$lang->custom->task->fields['typeList'] = '类型';
$lang->custom->task->fields['reasonList'] = '关闭原因';
$lang->custom->task->fields['statusList'] = '状态';
$lang->custom->task->fields['limitTaskDate'] = '起止日期';
$lang->custom->bug = new stdClass();
$lang->custom->bug->fields['required'] = $lang->custom->required;
@@ -324,3 +327,6 @@ $lang->custom->scrum->setConcept = "设置{$lang->projectCommon}概念";
$lang->custom->reviewRules['allpass'] = '全部通过通过';
$lang->custom->reviewRules['halfpass'] = '半数以上通过通过';
$lang->custom->limitTaskDate['0'] = '不限制';
$lang->custom->limitTaskDate['1'] = '限定在所属执行起止日期范围内';
+48
View File
@@ -0,0 +1,48 @@
<?php
/**
* The limittaskdate view file of custom module of ZenTaoPMS.
* @copyright Copyright 2009-2020 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Liyuchun <liyuchun@cnezsoft.com>
* @package custom
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
<div id='mainContent' class='main-row'>
<?php include 'sidebar.html.php';?>
<div class='main-col main-content'>
<form class="load-indicator main-form form-ajax" method='post' id='limitTaskDateForm'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->$module->fields['limitTaskDate'];?></strong>
</div>
</div>
<table class='table table-form'>
<tr>
<th class='c-name'><?php echo $lang->custom->beginAndEndDateRange;?></th>
<td class='c-select text-left'>
<?php $checkedKey = isset($config->limitTaskDate) ? $config->limitTaskDate : 0;?>
<?php foreach($lang->custom->limitTaskDate as $key => $value):?>
<label class="radio-inline"><input type="radio" name="limitTaskDate" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="limitTaskDate<?php echo $key;?>"><?php echo $value;?></label>
<?php endforeach;?>
</td>
<td></td>
</tr>
<tr>
<td colspan='2' class='form-actions text-center'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
<script>
$(function()
{
$('#mainMenu #taskTab').addClass('btn-active-text');
})
</script>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -8,7 +8,7 @@
$currentModule = 'custom';
$method = $key;
$params = $key == 'required' ? "module=$module" : '';
$active = $app->rawMethod == $key ? 'active' : '';
$active = $app->rawMethod == strtolower($key) ? 'active' : '';
if(!in_array($key, $config->custom->notSetMethods))
{
$params = "module=$module&field=$key";
+2
View File
@@ -1447,6 +1447,7 @@ $lang->resource->custom->kanban = 'kanban';
$lang->resource->custom->code = 'code';
$lang->resource->custom->hours = 'hours';
$lang->resource->custom->percent = 'percent';
$lang->resource->custom->limitTaskDate = 'beginAndEndDate';
$lang->custom->methodOrder[5] = 'index';
$lang->custom->methodOrder[10] = 'set';
@@ -1466,6 +1467,7 @@ $lang->custom->methodOrder[75] = 'kanban';
$lang->custom->methodOrder[80] = 'code';
$lang->custom->methodOrder[85] = 'hours';
$lang->custom->methodOrder[90] = 'percent';
$lang->custom->methodOrder[95] = 'limitTaskDate';
$lang->resource->datatable = new stdclass();
$lang->resource->datatable->setGlobal = 'setGlobal';