Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into zentaopms_289
This commit is contained in:
@@ -65,3 +65,5 @@ REPLACE INTO `zt_process` (`model`, `name`, `type`, `abbr`, `desc`, `assignedTo`
|
||||
|
||||
UPDATE `zt_chart` SET `sql` = 'SELECT tt.join as `year`, count(1) as number, tt.name from (\r\nselect \r\nt2.name, YEAR(t1.join) as `join`\r\nfrom zt_team t1 \r\nRIGHT JOIN zt_project t2 on t2.id = t1.root\r\nRIGHT JOIN zt_user t3 on t3.account = t1.account\r\nWHERE t1.type = \'project\'\r\nAND t2.deleted = \'0\'\r\n) tt\r\nGROUP BY tt.`name`, tt.join\r\nORDER BY tt.join, number desc, tt.name' WHERE `id` = '1097';
|
||||
UPDATE `zt_chart` SET `sql` = 'SELECT tt.join as `year`, count(1) as number, tt.setName from (\r\nselect \r\nYEAR(t1.join) as `join`, t4.name as setName \r\nfrom zt_team t1 \r\nRIGHT JOIN zt_project t2 on t2.id = t1.root\r\nLEFT JOIN zt_project t4 on FIND_IN_SET(t4.id,t2.path) and t4.grade = 1\r\nRIGHT JOIN zt_user t3 on t3.account = t1.account\r\nWHERE t1.type = \'project\'\r\nAND t2.deleted = \'0\'\r\nAND t3.deleted = \'0\'\r\n) tt\r\nGROUP BY tt.setName, tt.join\r\nORDER BY tt.join, number desc, tt.setName' WHERE `id` = '1086';
|
||||
|
||||
INSERT IGNORE INTO `zt_config` (`vision`, `owner`, `module`, `key`, `value`) VALUES ('', 'system', 'common', 'setCode', '1');
|
||||
|
||||
@@ -519,7 +519,7 @@ class adminModel extends model
|
||||
{
|
||||
if($hasInternet)
|
||||
{
|
||||
$searchType = $type == 'plugin' ? 'byUpdatedTime,offcial' : 'byModule';
|
||||
$searchType = $type == 'plugin' ? 'byModule,offcial' : 'byModule';
|
||||
$param = $type == 'plugin' ? '' : 'MTIxOA==';
|
||||
$extensions = $this->loadModel('extension')->getExtensionsByAPI($searchType, $param, 0, $limit);
|
||||
$plugins = isset($extensions->extensions) ? (array)$extensions->extensions : array();
|
||||
|
||||
@@ -223,7 +223,7 @@ $config->execution->datatable->fieldList['status']['required'] = 'no';
|
||||
$config->execution->datatable->fieldList['status']['fixed'] = 'no';
|
||||
|
||||
$config->execution->datatable->fieldList['PM']['title'] = 'owner';
|
||||
$config->execution->datatable->fieldList['PM']['width'] = '70';
|
||||
$config->execution->datatable->fieldList['PM']['width'] = '90';
|
||||
$config->execution->datatable->fieldList['PM']['required'] = 'no';
|
||||
$config->execution->datatable->fieldList['PM']['fixed'] = 'no';
|
||||
|
||||
|
||||
@@ -1036,7 +1036,8 @@ class execution extends control
|
||||
$execution = $this->commonAction($executionID);
|
||||
$project = $this->loadModel('project')->getByID($execution->project);
|
||||
$executionID = $execution->id;
|
||||
$products = $this->product->getProducts($execution->id);
|
||||
$products = $this->product->getProducts($execution->id);
|
||||
if(count($products) === 1) $productID = current($products)->id;
|
||||
|
||||
if($execution->hasProduct)
|
||||
{
|
||||
|
||||
@@ -1472,7 +1472,7 @@ class executionModel extends model
|
||||
->andWhere('t2.type')->eq('stage')
|
||||
->andWhere('t2.grade')->eq(1)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.parent')->eq($oldExecution->id)
|
||||
->andWhere('t2.parent')->eq($oldExecution->parent)
|
||||
->fetch('total');
|
||||
|
||||
if(!$oldPercentTotal) $oldPercentTotal = 0;
|
||||
@@ -3675,7 +3675,13 @@ class executionModel extends model
|
||||
if($changedAccounts)
|
||||
{
|
||||
$this->loadModel('user')->updateUserView($projectID, $projectType, $changedAccounts);
|
||||
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
$linkedProducts = $this->dao->select("t2.id")->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
|
||||
->where('t2.deleted')->eq(0)
|
||||
->andWhere('t1.project')->eq($projectID)
|
||||
->andWhere('t2.vision')->eq($this->config->vision)
|
||||
->fetchPairs();
|
||||
|
||||
if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', $changedAccounts);
|
||||
}
|
||||
}
|
||||
@@ -5541,7 +5547,8 @@ class executionModel extends model
|
||||
|
||||
foreach($fieldList as $field => $items)
|
||||
{
|
||||
$title = zget($this->lang->execution, $items['title'], zget($this->lang, $items['title'], $items['title']));
|
||||
$fieldKey = in_array($field, array('name', 'code', 'type', 'PM', 'status')) ? 'exec' . ucfirst($field) : $field;
|
||||
$title = $field == 'id' ? 'ID' : zget($this->lang->execution, $fieldKey, zget($this->lang, $field, $field));
|
||||
$fieldList[$field]['title'] = $title;
|
||||
}
|
||||
|
||||
|
||||
@@ -2204,7 +2204,12 @@ class projectModel extends model
|
||||
$changedAccounts = array_unique($changedAccounts);
|
||||
|
||||
$childSprints = $this->dao->select('id')->from(TABLE_PROJECT)->where('project')->eq($projectID)->andWhere('type')->in('stage,sprint')->andWhere('deleted')->eq('0')->fetchPairs();
|
||||
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
$linkedProducts = $this->dao->select("t2.id")->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
|
||||
->where('t2.deleted')->eq(0)
|
||||
->andWhere('t1.project')->eq($projectID)
|
||||
->andWhere('t2.vision')->eq($this->config->vision)
|
||||
->fetchPairs();
|
||||
|
||||
$this->loadModel('user')->updateUserView(array($projectID), 'project', $changedAccounts);
|
||||
if(!empty($childSprints)) $this->user->updateUserView($childSprints, 'sprint', $changedAccounts);
|
||||
|
||||
@@ -1372,7 +1372,7 @@ class repo extends control
|
||||
$content = file($logFile);
|
||||
$lastLine = $content[count($content) - 1];
|
||||
|
||||
if(strpos($lastLine, 'done') !== false)
|
||||
if(strpos($lastLine, 'done') === false)
|
||||
{
|
||||
if(strpos($lastLine, 'empty repository') !== false)
|
||||
{
|
||||
|
||||
+35
-12
@@ -20,10 +20,12 @@ $(function()
|
||||
$('#navbar .nav>li[data-id=story]>a').html($('#navbar .nav li.active [data-id=' + storyType + ']').text() + '<span class="caret"></span>');
|
||||
}
|
||||
|
||||
$('#saveButton').on('click', function(e)
|
||||
var $saveButton = $('#saveButton');
|
||||
var $saveDraftButton = $('#saveDraftButton');
|
||||
$saveButton.on('click', function(e)
|
||||
{
|
||||
$('#saveButton').attr('type', 'submit').attr('disabled', true);
|
||||
$('#saveDraftButton').attr('disabled', true);
|
||||
$saveButton.attr('type', 'submit').attr('disabled', true);
|
||||
$saveDraftButton.attr('disabled', true);
|
||||
|
||||
var storyStatus = !$('#reviewer').val() || $('#needNotReview').is(':checked') ? 'active' : 'reviewing';
|
||||
$('<input />').attr('type', 'hidden').attr('name', 'status').attr('value', storyStatus).appendTo('#dataform');
|
||||
@@ -32,15 +34,26 @@ $(function()
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#saveButton').attr('type', 'button').removeAttr('disabled');
|
||||
$('#saveDraftButton').removeAttr('disabled');
|
||||
}, 10000);
|
||||
if($saveButton.attr('disabled') == 'disabled')
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
console.log(11);
|
||||
$saveButton.attr('type', 'button').removeAttr('disabled');
|
||||
$saveDraftButton.removeAttr('disabled');
|
||||
}, 10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
$saveDraftButton.removeAttr('disabled');
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
|
||||
$('#saveDraftButton').on('click', function(e)
|
||||
$saveDraftButton.on('click', function(e)
|
||||
{
|
||||
$('#saveButton').attr('disabled', true);
|
||||
$('#saveDraftButton').attr('type', 'submit').attr('disabled', true);
|
||||
$saveButton.attr('disabled', true);
|
||||
$saveDraftButton.attr('type', 'submit').attr('disabled', true);
|
||||
|
||||
storyStatus = 'draft';
|
||||
if(typeof(page) != 'undefined' && page == 'change') storyStatus = 'changing';
|
||||
@@ -51,9 +64,19 @@ $(function()
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#saveButton').removeAttr('disabled');
|
||||
$('#saveDraftButton').attr('type', 'button').removeAttr('disabled');
|
||||
}, 10000);
|
||||
if($saveDraftButton.attr('disabled') == 'disabled')
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
$saveButton.removeAttr('disabled');
|
||||
$saveDraftButton.attr('type', 'button').removeAttr('disabled');
|
||||
}, 10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
$saveButton.removeAttr('disabled');
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
@@ -351,6 +351,7 @@ class task extends control
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->productID = $this->loadModel('product')->getProductIDByProject($projectID);;
|
||||
$this->view->features = $this->execution->getExecutionFeatures($execution);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
<td><?php echo html::hidden('status', 'wait');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=3');?>
|
||||
<?php $hiddenStory = (strpos(",$showFields,", ',story,') !== false and $execution->lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))) ? '' : 'hidden'?>
|
||||
<?php $hiddenStory = (strpos(",$showFields,", ',story,') !== false and $features['story']) ? '' : 'hidden'?>
|
||||
<tr class="<?php echo $hiddenStory?> storyBox">
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<td colspan='3'>
|
||||
|
||||
Reference in New Issue
Block a user