* Disable issue, risk, urstory when switch to lean mode for task #70565,#70566.

This commit is contained in:
daitingting
2022-09-28 02:16:14 +00:00
parent f3c6166235
commit 45d957cc9f
7 changed files with 88 additions and 29 deletions
+2
View File
@@ -22,6 +22,8 @@ $config->custom->requiredModules[35] = 'execution';
$config->custom->requiredModules[40] = 'task';
$config->custom->requiredModules[45] = 'build';
$config->custom->features = array('waterfall', 'URStory', 'scrumOpportunity', 'scrumMeeting', 'scrumAuditplan', 'scrumProcess', 'scrumIssue', 'scrumRisk');
$config->custom->requiredModules[50] = 'bug';
$config->custom->requiredModules[55] = 'testcase';
$config->custom->requiredModules[60] = 'testsuite';
+3 -3
View File
@@ -273,9 +273,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
$lang->custom->moduleName['productplan'] = 'Plan';
$lang->custom->moduleName['execution'] = $lang->custom->execution;
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptQuestions['storypoint'] = "3. Which of the following units is your company using for scale estimation?";
$lang->custom->conceptQuestions['overview'] = "Which combination of management fits your company?";
$lang->custom->conceptQuestions['URAndSR'] = "Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptQuestions['storypoint'] = "Which of the following units is your company using for scale estimation?";
$lang->custom->conceptOptions = new stdclass;
$lang->custom->conceptOptions->story = array();
+3 -3
View File
@@ -273,9 +273,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
$lang->custom->moduleName['productplan'] = 'Plan';
$lang->custom->moduleName['execution'] = $lang->custom->execution;
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptQuestions['storypoint'] = "3. Which of the following units is your company using for scale estimation?";
$lang->custom->conceptQuestions['overview'] = "Which combination of management fits your company?";
$lang->custom->conceptQuestions['URAndSR'] = "Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptQuestions['storypoint'] = "Which of the following units is your company using for scale estimation?";
$lang->custom->conceptOptions = new stdclass;
$lang->custom->conceptOptions->story = array();
+3 -3
View File
@@ -273,9 +273,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
$lang->custom->moduleName['productplan'] = 'Plan';
$lang->custom->moduleName['execution'] = $lang->custom->execution;
$lang->custom->conceptQuestions['overview'] = "1. Quelle combinaison de gestion convient le mieux à votre entreprise ?";
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptQuestions['storypoint'] = "3. Which of the following units is your company using for scale estimation?";
$lang->custom->conceptQuestions['overview'] = "Quelle combinaison de gestion convient le mieux à votre entreprise ?";
$lang->custom->conceptQuestions['URAndSR'] = "Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptQuestions['storypoint'] = "Which of the following units is your company using for scale estimation?";
$lang->custom->conceptOptions = new stdclass;
$lang->custom->conceptOptions->story = array();
+3 -3
View File
@@ -273,9 +273,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
$lang->custom->moduleName['productplan'] = '计划';
$lang->custom->moduleName['execution'] = $lang->custom->execution;
$lang->custom->conceptQuestions['overview'] = "1. 下述哪种组合方式更适合您公司的管理现状?";
$lang->custom->conceptQuestions['URAndSR'] = "2. 是否启用{$lang->URCommon}{$lang->SRCommon}概念?";
$lang->custom->conceptQuestions['storypoint'] = "3. 您公司是在使用以下哪种单位来做规模估算?";
$lang->custom->conceptQuestions['overview'] = "下述哪种组合方式更适合您公司的管理现状?";
$lang->custom->conceptQuestions['URAndSR'] = "是否启用{$lang->URCommon}{$lang->SRCommon}概念?";
$lang->custom->conceptQuestions['storypoint'] = "您公司是在使用以下哪种单位来做规模估算?";
$lang->custom->conceptOptions = new stdclass;
$lang->custom->conceptOptions->story = array();
+48 -3
View File
@@ -828,7 +828,7 @@ class customModel extends model
$counts = array();
$counts['waterfall'] = $this->dao->select('COUNT(*) AS waterfallCount')->from(TABLE_PROJECT)->where('model')->eq('waterfall')->andWhere('deleted')->eq('0')->fetch('waterfallCount');
$counts['URStory'] = $this->dao->select('COUNT(*) AS URStoryCount')->from(TABLE_STORY)->where('type')->eq('requirement')->andWhere('deleted')->eq('0')->fetch('URStoryCount');
if($this->config->edition == 'max') $count['assetLib'] = $this->dao->select('COUNT(*) AS assetLibCount')->from(TABLE_ASSETLIB)->where('deleted')->eq('0')->fetch('assetLibCount');
if($this->config->edition == 'max') $counts['assetLib'] = $this->dao->select('COUNT(*) AS assetLibCount')->from(TABLE_ASSETLIB)->where('deleted')->eq('0')->fetch('assetLibCount');
return $counts;
}
@@ -903,8 +903,7 @@ class customModel extends model
$disabledFeatures = '';
if($mode == 'lean')
{
$features = array('scrumOpportunity', 'scrumMeeting', 'scrumAuditplan', 'scrumProcess');
foreach($features as $feature)
foreach($this->config->custom->features as $feature)
{
$function = 'has' . ucfirst($feature) . 'Data';
if(!$this->$function()) $disabledFeatures .= "$feature,";
@@ -913,6 +912,52 @@ class customModel extends model
$this->loadModel('setting')->setItem('system.common.disabledFeatures', rtrim($disabledFeatures, ','));
}
/**
* Check for URStory data.
*
* @access public
* @return int
*/
public function hasURStoryData()
{
return $this->dao->select('*')->from(TABLE_STORY)->where('type')->eq('requirement')->andWhere('deleted')->eq('0')->count();
}
/**
* Check for waterfall project data.
*
* @access public
* @return int
*/
public function hasWaterfallData()
{
return $this->dao->select('*')->from(TABLE_PROJECT)->where('model')->eq('waterfall')->andWhere('deleted')->eq('0')->count();
}
/**
* Check for issue data.
*
* @access public
* @return bool|int
*/
public function hasScrumIssueData()
{
if($this->config->edition == 'max') return $this->dao->select('*')->from(TABLE_ISSUE)->where('deleted')->eq('0')->andWhere('execution')->ne(0)->count();
return false;
}
/**
* Check for risk data.
*
* @access public
* @return bool
*/
public function hasScrumRiskData()
{
if($this->config->edition == 'max') return $this->dao->select('*')->from(TABLE_RISK)->where('deleted')->eq('0')->andWhere('execution')->ne(0)->count();
return false;
}
/**
* Verify whether there is scrum opportunity data
*
+26 -14
View File
@@ -26,20 +26,32 @@
<?php endif;?>
<form class='form-ajax' method='post'>
<div class='modal-body'>
<div class="form-group">
<label><?php echo $lang->custom->conceptQuestions['overview']?></label>
<div class="checkbox"> <?php echo html::radio('sprintConcept', $lang->custom->sprintConceptList, zget($this->config->custom, 'sprintConcept', '0'))?> </div>
</div>
<div class="form-group">
<label><?php echo $lang->custom->conceptQuestions['URAndSR']?></label>
<div class="checkbox"> <?php echo html::radio('URAndSR', $lang->custom->conceptOptions->URAndSR, zget($this->config->custom, 'URAndSR', '0'));?></div>
</div>
<?php if($this->config->edition != 'max'):?>
<div class="form-group">
<label id='storypoint'><?php echo $lang->custom->conceptQuestions['storypoint'];?></label>
<div class="checkbox"> <?php echo html::radio('hourPoint', $lang->custom->conceptOptions->hourPoint, zget($this->config->custom, 'hourPoint'))?> </div>
</div>
<?php endif;?>
<ol>
<li>
<div class="form-group">
<label><?php echo $lang->custom->conceptQuestions['overview']?></label>
<div class="checkbox"> <?php echo html::radio('sprintConcept', $lang->custom->sprintConceptList, zget($this->config->custom, 'sprintConcept', '0'))?> </div>
</div>
</li>
<?php if(strpos(",{$this->config->disabledFeatures},", ',URStory,') === false):?>
<li>
<div class="form-group">
<label><?php echo $lang->custom->conceptQuestions['URAndSR']?></label>
<div class="checkbox"> <?php echo html::radio('URAndSR', $lang->custom->conceptOptions->URAndSR, zget($this->config->custom, 'URAndSR', '0'));?></div>
</div>
</li>
<?php endif;?>
<?php if($this->config->edition != 'max'):?>
<li>
<div class="form-group">
<label id='storypoint'><?php echo $lang->custom->conceptQuestions['storypoint'];?></label>
<div class="checkbox"> <?php echo html::radio('hourPoint', $lang->custom->conceptOptions->hourPoint, zget($this->config->custom, 'hourPoint'))?> </div>
</div>
</li>
<?php endif;?>
</ol>
<div class="form-group">
<label></label>
<div><?php echo html::submitButton();?></div>