Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -597,7 +597,7 @@ class block extends control
|
||||
*/
|
||||
public function printTodoBlock()
|
||||
{
|
||||
$limit = $this->viewType == 'json' ? 0 : (int)$this->params->count;
|
||||
$limit = ($this->viewType == 'json' or !isset($this->params->count)) ? 0 : (int)$this->params->count;
|
||||
$todos = $this->loadModel('todo')->getList('all', $this->app->user->account, 'wait, doing', $limit, $pager = null, $orderBy = 'date, begin');
|
||||
$uri = $this->app->getURI(true);
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ class ci extends control
|
||||
|
||||
$testtask = new stdclass();
|
||||
$testtask->product = $productID;
|
||||
$testtask->name = sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s'));
|
||||
$testtask->name = !empty($post->name) ? $post->name : sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s'));
|
||||
$testtask->owner = $this->app->user->account;
|
||||
$testtask->project = $lastProject->project;
|
||||
$testtask->execution = $lastProject->id;
|
||||
|
||||
@@ -463,6 +463,7 @@ if(!defined('DT_TIME2')) define('DT_TIME2', 'H:i');
|
||||
if(!defined('LONG_TIME')) define('LONG_TIME', '2059-12-31');
|
||||
if(!defined('BRANCH_MAIN')) define('BRANCH_MAIN', '0');
|
||||
if(!defined('DEFAULT_CARDCOUNT')) define('DEFAULT_CARDCOUNT', '2');
|
||||
if(!defined('MAX_CARDCOUNT')) define('MAX_CARDCOUNT', '32767');
|
||||
|
||||
/* Datepicker. */
|
||||
$lang->datepicker = new stdclass();
|
||||
|
||||
@@ -463,6 +463,7 @@ if(!defined('DT_TIME2')) define('DT_TIME2', 'H:i');
|
||||
if(!defined('LONG_TIME')) define('LONG_TIME', '2059-12-31');
|
||||
if(!defined('BRANCH_MAIN')) define('BRANCH_MAIN', '0');
|
||||
if(!defined('DEFAULT_CARDCOUNT')) define('DEFAULT_CARDCOUNT', '2');
|
||||
if(!defined('MAX_CARDCOUNT')) define('MAX_CARDCOUNT', '32767');
|
||||
|
||||
/* Datepicker. */
|
||||
$lang->datepicker = new stdclass();
|
||||
|
||||
@@ -463,6 +463,7 @@ if(!defined('DT_TIME2')) define('DT_TIME2', 'H:i');
|
||||
if(!defined('LONG_TIME')) define('LONG_TIME', '2059-12-31');
|
||||
if(!defined('BRANCH_MAIN')) define('BRANCH_MAIN', '0');
|
||||
if(!defined('DEFAULT_CARDCOUNT')) define('DEFAULT_CARDCOUNT', '2');
|
||||
if(!defined('MAX_CARDCOUNT')) define('MAX_CARDCOUNT', '32767');
|
||||
|
||||
/* Datepicker. */
|
||||
$lang->datepicker = new stdclass();
|
||||
|
||||
@@ -463,6 +463,7 @@ if(!defined('DT_TIME2')) define('DT_TIME2', 'H:i');
|
||||
if(!defined('LONG_TIME')) define('LONG_TIME', '2059-12-31');
|
||||
if(!defined('BRANCH_MAIN')) define('BRANCH_MAIN', '0');
|
||||
if(!defined('DEFAULT_CARDCOUNT')) define('DEFAULT_CARDCOUNT', '2');
|
||||
if(!defined('MAX_CARDCOUNT')) define('MAX_CARDCOUNT', '32767');
|
||||
|
||||
/* datepicker 时间*/
|
||||
$lang->datepicker = new stdclass();
|
||||
|
||||
@@ -2420,6 +2420,7 @@ EOD;
|
||||
($module == 'sso' and $method == 'login') or
|
||||
($module == 'report' && $method == 'annualdata') or
|
||||
($module == 'misc' && $method == 'captcha') or
|
||||
($module == 'execution' and $method == 'printkanban') or
|
||||
($module == 'traincourse' and $method == 'ajaxuploadlargefile') or
|
||||
($module == 'traincourse' and $method == 'playvideo'))
|
||||
{
|
||||
|
||||
@@ -51,6 +51,12 @@ adjustMenuWidth();
|
||||
if(window.navigator.userAgent.indexOf('xuanxuan') > 0)
|
||||
{
|
||||
$('li.user-tutorial').addClass('hide');
|
||||
|
||||
/* Fix double header covering #main. */
|
||||
$('document').ready(function()
|
||||
{
|
||||
$('#subHeader').parent().parent().children('#main').css('top', '100px');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<main id='main' <?php if(!empty($config->sso->redirect)) echo "class='ranzhiFixedTfootAction'";?> >
|
||||
|
||||
@@ -8,7 +8,7 @@ $defaultTheme = $webRoot . 'theme/default/';
|
||||
$langTheme = $themeRoot . 'lang/' . $clientLang . '.css';
|
||||
$clientTheme = $this->app->getClientTheme();
|
||||
$onlybody = zget($_GET, 'onlybody', 'no');
|
||||
$commonLang = array('zh-cn', 'zh-tw', 'en');
|
||||
$commonLang = array('zh-cn', 'zh-tw', 'en', 'fr', 'de');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang='<?php echo $clientLang;?>'>
|
||||
|
||||
@@ -820,7 +820,7 @@ 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($branchGroups as $branches)
|
||||
{
|
||||
foreach($branches as $branchID => $name)
|
||||
{
|
||||
@@ -4168,4 +4168,23 @@ class execution extends control
|
||||
echo json_encode($executions);
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: Get execution kanban data.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetExecutionKanban($executionID)
|
||||
{
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
if($this->app->tab == 'execution' and $execution->type == 'kanban')
|
||||
{
|
||||
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
|
||||
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
|
||||
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
|
||||
echo json_encode($kanbanData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,10 +9,19 @@ $(function()
|
||||
/**
|
||||
* Go back.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function goback()
|
||||
function goback(executionID)
|
||||
{
|
||||
parent.location.reload();
|
||||
var link = createLink('execution', 'ajaxGetExecutionKanban', "executionID=" + executionID);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
kanbanData = $.parseJSON(data);
|
||||
parent.updateKanban(kanbanData);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ $(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!unlinkTaskIdList) return false;
|
||||
|
||||
$('#storyIdList').val(unlinkTaskIdList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4441,6 +4441,18 @@ class executionModel extends model
|
||||
return $productpairs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lifetime by id list.
|
||||
*
|
||||
* @param string $idList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLifetimeByIdList($idList = '')
|
||||
{
|
||||
return $this->dao->select('id,lifetime')->from(TABLE_EXECUTION)->where('id')->in($idList)->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
** Set stage tree path.
|
||||
**
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</div>
|
||||
<div class='btn-toolbar'>
|
||||
<?php if(isonlybody()):?>
|
||||
<?php echo html::commonButton('<i class="icon icon-sm"></i> ' . $lang->goback, 'onclick="goback()"', 'btn');?>
|
||||
<?php echo html::commonButton('<i class="icon icon-sm"></i> ' . $lang->goback, "onclick='goback($executionID)'", 'btn');?>
|
||||
<?php else:?>
|
||||
<?php echo html::backButton('','','btn');?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -38,6 +38,9 @@ class job extends control
|
||||
*/
|
||||
public function browse($repoID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$repos = $this->loadModel('repo')->getRepoPairs('devops');
|
||||
if(empty($repos)) $this->locate($this->repo->createLink('create'));
|
||||
|
||||
/* Set session. */
|
||||
$this->loadModel('ci')->setMenu($repoID);
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ $lang->kanbancolumn->fluidBoardList['0'] = 'Fixed';
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = 'Auto Width';
|
||||
|
||||
$lang->kanbanlane->error = new stdclass();
|
||||
$lang->kanbanlane->error->mustBeInt = 'The number of cards must be a positive integer greater than 2.';
|
||||
$lang->kanbanlane->error->mustBeInt = 'No. of cards must be a positive integer from 3 to 32767.';
|
||||
|
||||
$lang->kanbanregion = new stdclass();
|
||||
$lang->kanbanregion->name = 'Region Name';
|
||||
|
||||
@@ -349,7 +349,7 @@ $lang->kanbancolumn->fluidBoardList['0'] = 'Fixed';
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = 'Auto Width';
|
||||
|
||||
$lang->kanbanlane->error = new stdclass();
|
||||
$lang->kanbanlane->error->mustBeInt = 'The number of cards must be a positive integer greater than 2.';
|
||||
$lang->kanbanlane->error->mustBeInt = 'No. of cards must be a positive integer from 3 to 32767.';
|
||||
|
||||
$lang->kanbanregion = new stdclass();
|
||||
$lang->kanbanregion->name = 'Region Name';
|
||||
|
||||
@@ -349,7 +349,7 @@ $lang->kanbancolumn->fluidBoardList['0'] = 'Fixed';
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = 'Auto Width';
|
||||
|
||||
$lang->kanbanlane->error = new stdclass();
|
||||
$lang->kanbanlane->error->mustBeInt = 'The number of cards must be a positive integer greater than 2.';
|
||||
$lang->kanbanlane->error->mustBeInt = 'Nb de cartes doit être un entier positif compris entre 3 et 32767.';
|
||||
|
||||
$lang->kanbanregion = new stdclass();
|
||||
$lang->kanbanregion->name = 'Region Name';
|
||||
|
||||
@@ -349,7 +349,7 @@ $lang->kanbancolumn->fluidBoardList['0'] = '固定列宽';
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = '自适应列宽';
|
||||
|
||||
$lang->kanbanlane->error = new stdclass();
|
||||
$lang->kanbanlane->error->mustBeInt = '卡片数量必须是大于2的正整数。';
|
||||
$lang->kanbanlane->error->mustBeInt = '卡片数量必须是 3~32767 的正整数。';
|
||||
|
||||
$lang->kanbanregion = new stdclass();
|
||||
$lang->kanbanregion->name = '区域名称';
|
||||
|
||||
@@ -1680,9 +1680,10 @@ class kanbanModel extends model
|
||||
if($browseType == 'task')
|
||||
{
|
||||
if($searchValue != '' and strpos($object->name, $searchValue) === false) continue;
|
||||
$cardData['name'] = $object->name;
|
||||
$cardData['status'] = $object->status;
|
||||
$cardData['left'] = $object->left;
|
||||
$cardData['name'] = $object->name;
|
||||
$cardData['status'] = $object->status;
|
||||
$cardData['left'] = $object->left;
|
||||
$cardData['estStarted'] = $object->estStarted;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3959,7 +3960,7 @@ class kanbanModel extends model
|
||||
*/
|
||||
public function checkDisplayCards($count)
|
||||
{
|
||||
if(!preg_match("/^-?\d+$/", $count) or $count <= DEFAULT_CARDCOUNT) dao::$errors['displayCards'] = $this->lang->kanbanlane->error->mustBeInt;
|
||||
if(!preg_match("/^-?\d+$/", $count) or $count <= DEFAULT_CARDCOUNT or $count > MAX_CARDCOUNT) dao::$errors['displayCards'] = $this->lang->kanbanlane->error->mustBeInt;
|
||||
return !dao::isError();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ class productplanModel extends model
|
||||
$childStatus = $this->dao->select('status')->from(TABLE_PRODUCTPLAN)->where('parent')->eq($parentID)->andWhere('deleted')->eq(0)->fetchPairs();
|
||||
|
||||
/* If the subplan is empty, update the plan. */
|
||||
if(empty($childStatus)) $this->dao->update(TABLE_PRODUCTPLAN)->set('parent')->eq(0)->exec();
|
||||
if(empty($childStatus)) $this->dao->update(TABLE_PRODUCTPLAN)->set('parent')->eq(0)->where('id')->eq($parentID)->exec();
|
||||
|
||||
if(count($childStatus) == 1 and isset($childStatus['wait']))
|
||||
{
|
||||
|
||||
@@ -21,22 +21,23 @@
|
||||
<h2 class='text-center'><?php echo $lang->project->chooseProgramType; ?></h2>
|
||||
<div class='row'>
|
||||
<div class='col-xs-4'>
|
||||
<?php $tab = $from == 'global' ? 'project' : $app->tab;?>
|
||||
<div class='project-type text-center'>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=scrum&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='scrum' src='{$config->webRoot}theme/default/images/main/scrum.png'>", '', "data-app='{$this->app->tab}' class='createButton'")?>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=scrum&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='scrum' src='{$config->webRoot}theme/default/images/main/scrum.png'>", '', "data-app='{$tab}' class='createButton'")?>
|
||||
<h3><?php echo $lang->project->scrum; ?></h3>
|
||||
<p><?php echo $lang->project->scrumTitle; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-xs-4'>
|
||||
<div class='project-type text-center'>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=waterfall&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='waterfall' src='{$config->webRoot}theme/default/images/main/waterfall.png'>", '', "data-app='{$this->app->tab}' class='createButton'")?>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=waterfall&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='waterfall' src='{$config->webRoot}theme/default/images/main/waterfall.png'>", '', "data-app='{$tab}' class='createButton'")?>
|
||||
<h3><?php echo $lang->project->waterfall; ?></h3>
|
||||
<p><?php echo $lang->project->waterfallTitle; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-xs-4'>
|
||||
<div class='project-type text-center'>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=kanban&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='kanban' src='{$config->webRoot}theme/default/images/main/kanban.png'>", '', "data-app='{$this->app->tab}' class='createButton'")?>
|
||||
<?php echo html::a($this->createLink("project", "create", "model=kanban&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "<img class='project-type-img' data-type='kanban' src='{$config->webRoot}theme/default/images/main/kanban.png'>", '', "data-app='{$tab}' class='createButton'")?>
|
||||
<h3><?php echo $lang->project->kanban;?></h3>
|
||||
<p><?php echo $lang->project->kanbanTitle;?></p>
|
||||
</div>
|
||||
|
||||
@@ -1139,6 +1139,7 @@ class repo extends control
|
||||
*/
|
||||
public function ajaxGetDropMenu($repoID, $module = 'repo', $method = 'browse')
|
||||
{
|
||||
if($module == 'repo' and !in_array($method, array('review', 'diff'))) $method = 'browse';
|
||||
if($module == 'mr') $method = 'browse';
|
||||
if($module == 'job') $method = 'browse';
|
||||
if($module == 'compile' and $method == 'logs') $method = 'browse';
|
||||
|
||||
@@ -53,9 +53,10 @@ class repoModel extends model
|
||||
echo(js::alert($this->lang->repo->error->accessDenied));
|
||||
return print(js::locate('back'));
|
||||
}
|
||||
}
|
||||
|
||||
$this->lang->switcherMenu = $this->getSwitcher($repoID);
|
||||
if($repo->SCM != 'Gitlab') unset($this->lang->devops->menu->mr);
|
||||
$this->lang->switcherMenu = $this->getSwitcher($repoID);
|
||||
}
|
||||
|
||||
common::setMenuVars('devops', $repoID);
|
||||
if(!session_id()) session_start();
|
||||
|
||||
@@ -129,7 +129,7 @@ $config->story->datatable->fieldList['estimate']['required'] = 'no';
|
||||
|
||||
$config->story->datatable->fieldList['stage']['title'] = 'stageAB';
|
||||
$config->story->datatable->fieldList['stage']['fixed'] = 'no';
|
||||
$config->story->datatable->fieldList['stage']['width'] = '75';
|
||||
$config->story->datatable->fieldList['stage']['width'] = '80';
|
||||
$config->story->datatable->fieldList['stage']['required'] = 'no';
|
||||
|
||||
$config->story->datatable->fieldList['openedBy']['title'] = 'openedByAB';
|
||||
|
||||
@@ -290,7 +290,8 @@ class task extends control
|
||||
|
||||
/* Set Custom*/
|
||||
foreach(explode(',', $this->config->task->customCreateFields) as $field) $customFields[$field] = $this->lang->task->$field;
|
||||
if($execution->type == 'ops') unset($customFields['story']);
|
||||
|
||||
$executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, !common::canModify('execution', $execution) ? 'noclosed' : 'all', 0, true);
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->task->custom->createFields;
|
||||
@@ -300,7 +301,8 @@ class task extends control
|
||||
$this->view->position = $position;
|
||||
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'task', "executionID=$executionID") : '';
|
||||
$this->view->execution = $execution;
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, !common::canModify('execution', $execution) ? 'noclosed' : 'all', 0, true);
|
||||
$this->view->executions = $executions;
|
||||
$this->view->lifetimeList = $this->execution->getLifetimeByIdList(array_keys($executions));
|
||||
$this->view->task = $task;
|
||||
$this->view->users = $users;
|
||||
$this->view->storyID = $storyID;
|
||||
@@ -435,6 +437,9 @@ class task extends control
|
||||
if($execution->type == 'stage' and strpos('estStarted,deadline', $field) !== false) continue;
|
||||
$customFields[$field] = $this->lang->task->$field;
|
||||
}
|
||||
|
||||
if($execution->lifetime == 'ops') unset($customFields['story']);
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->task->custom->batchCreateFields;
|
||||
|
||||
|
||||
@@ -3,6 +3,17 @@ $(function()
|
||||
$('#customField').click(function()
|
||||
{
|
||||
hiddenRequireFields();
|
||||
|
||||
var fieldList = showFields + ',';
|
||||
var requiredList = ',' + requiredFields + ',';
|
||||
if(lifetime == 'ops')
|
||||
{
|
||||
$('#fieldsstory').parent('div').addClass('hidden');
|
||||
}
|
||||
else if(fieldList.indexOf('story') >= 0 && requiredList.indexOf('story') < 0)
|
||||
{
|
||||
$('#fieldsstory').parent('div').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
/* Implement a custom form without feeling refresh. */
|
||||
@@ -22,6 +33,17 @@ $(function()
|
||||
*/
|
||||
function loadAll(executionID)
|
||||
{
|
||||
lifetime = lifetimeList[executionID];
|
||||
var fieldList = showFields + ',';
|
||||
if(lifetime == 'ops')
|
||||
{
|
||||
$('.storyBox').addClass('hidden');
|
||||
}
|
||||
else if(fieldList.indexOf('story') >= 0)
|
||||
{
|
||||
$('.storyBox').removeClass('hidden');
|
||||
}
|
||||
|
||||
loadModuleMenu(executionID);
|
||||
loadExecutionStories(executionID);
|
||||
loadExecutionMembers(executionID);
|
||||
@@ -408,8 +430,11 @@ $(document).ready(function()
|
||||
});
|
||||
$('#type').change(function()
|
||||
{
|
||||
$('#selectTestStoryBox').toggleClass('hidden', $(this).val() != 'test');
|
||||
toggleSelectTestStory();
|
||||
if(lifetime != 'ops')
|
||||
{
|
||||
$('#selectTestStoryBox').toggleClass('hidden', $(this).val() != 'test');
|
||||
toggleSelectTestStory();
|
||||
}
|
||||
});
|
||||
|
||||
setStoryRelated();
|
||||
|
||||
@@ -116,8 +116,8 @@ class taskModel extends model
|
||||
$task = $this->loadModel('file')->processImgURL($task, $this->config->task->editor->create['id'], $this->post->uid);
|
||||
|
||||
/* Fix Bug #1525 */
|
||||
$executionType = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('type');
|
||||
if($executionType == 'ops')
|
||||
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('lifetime');
|
||||
if($executionLifetime == 'ops')
|
||||
{
|
||||
$requiredFields = str_replace(",story,", ',', "$requiredFields");
|
||||
$task->story = 0;
|
||||
@@ -381,9 +381,9 @@ class taskModel extends model
|
||||
}
|
||||
|
||||
/* Fix bug #1525*/
|
||||
$executionType = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('type');
|
||||
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('lifetime');
|
||||
$requiredFields = ',' . $this->config->task->create->requiredFields . ',';
|
||||
if($executionType == 'ops') $requiredFields = str_replace(',story,', ',', $requiredFields);
|
||||
if($executionLifetime == 'ops') $requiredFields = str_replace(',story,', ',', $requiredFields);
|
||||
$requiredFields = trim($requiredFields, ',');
|
||||
|
||||
/* check data. */
|
||||
@@ -809,7 +809,7 @@ class taskModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
if($team[$oldTask->assignedTo]->left == 0 && $team[$oldTask->assignedTo]->consumed != 0)
|
||||
if($team[$oldTask->assignedTo]->left == 0 and $team[$oldTask->assignedTo]->consumed != 0 and $this->app->rawMethod != 'deleteestimate')
|
||||
{
|
||||
if($oldTask->assignedTo != $teams[count($teams) - 1])
|
||||
{
|
||||
@@ -1036,9 +1036,9 @@ class taskModel extends model
|
||||
$task->mode = '';
|
||||
}
|
||||
|
||||
$executionType = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($task->execution)->fetch('type');
|
||||
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($task->execution)->fetch('lifetime');
|
||||
$requiredFields = "," . $this->config->task->edit->requiredFields . ",";
|
||||
if($executionType == 'ops')
|
||||
if($executionLifetime == 'ops')
|
||||
{
|
||||
$requiredFields = str_replace(",story,", ',', "$requiredFields");
|
||||
$task->story = 0;
|
||||
@@ -3738,6 +3738,7 @@ class taskModel extends model
|
||||
public function getFinishedUsers($taskID = 0, $team = array())
|
||||
{
|
||||
$task = $this->getById($taskID);
|
||||
if($task->activatedDate == '') $task->activatedDate = "0000-00-00";
|
||||
return $this->dao->select('actor')->from(TABLE_ACTION)
|
||||
->where('objectType')->eq('task')
|
||||
->andWhere('objectID')->eq($taskID)
|
||||
|
||||
@@ -45,7 +45,7 @@ $colspan = count($visibleFields) + 3;
|
||||
<?php echo $lang->task->batchCreate;?>
|
||||
<?php endif;?>
|
||||
</h2>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<?php if($execution->lifetime != 'ops'):?>
|
||||
<a class="checkbox-primary pull-left" id='zeroTaskStory' href='javascript:toggleZeroTaskStory();'>
|
||||
<label><?php echo $lang->story->zeroTask;?></label>
|
||||
</a>
|
||||
@@ -67,7 +67,7 @@ $colspan = count($visibleFields) + 3;
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?> moduleBox'><?php echo $lang->task->module?></th>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<?php if($execution->lifetime != 'ops'):?>
|
||||
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?> storyBox'><?php echo $lang->task->story;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-name required has-btn'><?php echo $lang->task->name;?></span></th>
|
||||
@@ -99,7 +99,7 @@ $colspan = count($visibleFields) + 3;
|
||||
$lang->task->typeList['ditto'] = $lang->task->ditto;
|
||||
$members['ditto'] = $lang->task->ditto;
|
||||
$modules['ditto'] = $lang->task->ditto;
|
||||
if($execution->type == 'ops') $colspan = $colspan - 1;
|
||||
if($execution->lifetime == 'ops') $colspan = $colspan - 1;
|
||||
?>
|
||||
<?php for($i = 1; $i <= $config->task->batchCreate; $i++):?>
|
||||
<?php
|
||||
@@ -121,12 +121,12 @@ $colspan = count($visibleFields) + 3;
|
||||
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen' onchange='setStories(this.value, $execution->id)'")?>
|
||||
<?php echo html::hidden("parent[$i]", $parent);?>
|
||||
</td>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<?php if($execution->lifetime != 'ops'):?>
|
||||
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
|
||||
<span class='input-group-btn'>
|
||||
<a id='preview<?php echo $i;?>' href='#' class='btn iframe btn-link btn-icon btn-copy' style='pointer-events:none' data-width='80%' disabled='disabled' title='<?php echo $lang->preview; ?>'><i class='icon-eye'></i></a>
|
||||
<a id='preview<?php echo $i;?>' href='#' class='btn iframe btn-link btn-icon btn-copy' style='pointer-events:none' data-width='95%' disabled='disabled' title='<?php echo $lang->preview; ?>'><i class='icon-eye'></i></a>
|
||||
<a href='javascript:copyStoryTitle(<?php echo $i;?>)' class='btn btn-link btn-icon btn-copy' title='<?php echo $lang->task->copyStoryTitle; ?>'><i class='icon-arrow-right'></i></a>
|
||||
<?php echo html::hidden("storyEstimate$i") . html::hidden("storyDesc$i") . html::hidden("storyPri$i");?>
|
||||
</span>
|
||||
@@ -266,7 +266,7 @@ $colspan = count($visibleFields) + 3;
|
||||
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen'")?>
|
||||
<?php echo html::hidden("parent[$i]", $parent);?>
|
||||
</td>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<?php if($execution->lifetime != 'ops'):?>
|
||||
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
<?php js::set('vision', $config->vision);?>
|
||||
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
|
||||
<?php js::set('estimateNotEmpty', sprintf($lang->error->notempty, $lang->task->estimate))?>
|
||||
<?php js::set('lifetime', $execution->lifetime);?>
|
||||
<?php js::set('lifetimeList', $lifetimeList);?>
|
||||
<?php if(!empty($storyID)):?>
|
||||
<style> .title-group.required > .required:after {right: 110px;}</style>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<?php if(empty($task->team) or $task->assignedTo == $this->app->user->account or ($task->mode == 'multi' and isset($task->team[$app->user->account]))):?>
|
||||
<td align='center' class='c-actions'>
|
||||
<?php
|
||||
if($this->app->user->admin or $this->app->user->account == $estimate->account)
|
||||
if($this->app->user->account == $estimate->account)
|
||||
{
|
||||
common::printIcon('task', 'editEstimate', "estimateID=$estimate->id", '', 'list', 'pencil', '', 'showinonlybody', true);
|
||||
common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'close', 'hiddenwin', 'showinonlybody');
|
||||
|
||||
@@ -1237,6 +1237,8 @@ function showCheckedFields(fields)
|
||||
if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden');
|
||||
if(!$('.datePlanBox').hasClass('hidden')) $('.datePlanBox').addClass('hidden');
|
||||
}
|
||||
|
||||
if(typeof lifetime != 'undefined' && lifetime == 'ops') $('.storyBox').addClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user