Merge branch 'zentaopms_9.8' of https://github.com/easysoft/zentaopms into zentaopms_9.8
This commit is contained in:
@@ -32,6 +32,7 @@ class actionModel extends model
|
||||
*/
|
||||
public function create($objectType, $objectID, $actionType, $comment = '', $extra = '', $actor = '', $autoDelete = true)
|
||||
{
|
||||
if(empty($comment)) return false;
|
||||
$actor = $actor ? $actor : $this->app->user->account;
|
||||
$actionType = strtolower($actionType);
|
||||
if($actor == 'guest' and $actionType == 'logout') return false;
|
||||
|
||||
@@ -37,7 +37,15 @@ class api extends control
|
||||
*/
|
||||
public function getModel($moduleName, $methodName, $params = '')
|
||||
{
|
||||
parse_str(str_replace(',', '&', $params), $params);
|
||||
$params = explode(',', $params);
|
||||
$newParams = array_shift($params);
|
||||
foreach($params as $param)
|
||||
{
|
||||
$sign = strpos($param, '=') !== false ? '&' : ',';
|
||||
$newParams .= $sign . $param;
|
||||
}
|
||||
|
||||
parse_str($newParams, $params);
|
||||
$module = $this->loadModel($moduleName);
|
||||
$result = call_user_func_array(array(&$module, $methodName), $params);
|
||||
if(dao::isError()) die(json_encode(dao::getError()));
|
||||
|
||||
+11
-3
@@ -82,12 +82,14 @@ class branchModel extends model
|
||||
*
|
||||
* @param array $products
|
||||
* @param string $params
|
||||
* @param array $appendBranch
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getByProducts($products, $params = '')
|
||||
public function getByProducts($products, $params = '', $appendBranch = '')
|
||||
{
|
||||
$branches = $this->dao->select('*')->from(TABLE_BRANCH)->where('product')->in($products)->andWhere('deleted')->eq(0)->orderBy('`order`')->fetchAll();
|
||||
$branches = $this->dao->select('*')->from(TABLE_BRANCH)->where('product')->in($products)->andWhere('deleted')->eq(0)->orderBy('`order`')->fetchAll('id');
|
||||
if(!empty($appendBranch)) $branches += $this->dao->select('*')->from(TABLE_BRANCH)->where('id')->in($appendBranch)->orderBy('`order`')->fetchAll('id');
|
||||
$products = $this->loadModel('product')->getByIdList($products);
|
||||
|
||||
$branchGroups = array();
|
||||
@@ -154,6 +156,12 @@ class branchModel extends model
|
||||
$case = $this->dao->select('id')->from(TABLE_CASE)->where('branch')->eq($branchID)->andWhere('deleted')->eq(0)->limit(1)->fetch();
|
||||
$release = $this->dao->select('id')->from(TABLE_RELEASE)->where('branch')->eq($branchID)->andWhere('deleted')->eq(0)->limit(1)->fetch();
|
||||
$build = $this->dao->select('id')->from(TABLE_BUILD)->where('branch')->eq($branchID)->andWhere('deleted')->eq(0)->limit(1)->fetch();
|
||||
return empty($module) and empty($story) and empty($bug) and empty($case) and empty($release) and empty($build) and empty($plan);
|
||||
$project = $this->dao->select('t1.id')->from(TABLE_PROJECT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.id=t2.project')
|
||||
->where('t2.branch')->eq($branchID)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->limit(1)
|
||||
->fetch();
|
||||
return empty($module) && empty($story) && empty($bug) && empty($case) && empty($release) && empty($build) && empty($plan) && empty($project);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ $config->bug->list->exportFields = 'id, product, branch, module, project, story,
|
||||
lastEditedDate, files';
|
||||
|
||||
$config->bug->list->customCreateFields = 'project,story,task,pri,severity,os,browser,deadline,mailto,keywords';
|
||||
$config->bug->list->customBatchCreateFields = 'module,project,steps,type,pri,severity,os,browser,keywords';
|
||||
$config->bug->list->customBatchCreateFields = 'module,project,steps,type,pri,deadline,severity,os,browser,keywords';
|
||||
$config->bug->list->customBatchEditFields = 'type,severity,pri,productplan,assignedTo,deadline,status,resolvedBy,resolution,os,browser,keywords';
|
||||
|
||||
$config->bug->custom = new stdclass();
|
||||
|
||||
@@ -163,6 +163,7 @@ class bugModel extends model
|
||||
$bug->openedBuild = implode(',', $data->openedBuilds[$i]);
|
||||
$bug->color = $data->color[$i];
|
||||
$bug->title = $data->title[$i];
|
||||
$bug->deadline = $data->deadlines[$i];
|
||||
$bug->steps = nl2br($data->stepses[$i]);
|
||||
$bug->type = $data->types[$i];
|
||||
$bug->pri = $data->pris[$i];
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['bug']);?></span>
|
||||
@@ -27,11 +28,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->bug->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form class='form-condensed' class='form-condensed' method='post' target='hiddenwin'>
|
||||
<table class='table table-fixed table-form with-border'>
|
||||
@@ -40,16 +50,44 @@ foreach(explode(',', $showFields) as $field)
|
||||
<th class='w-50px'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, $product->type, ' hidden')?>'> <?php echo $lang->product->branch;?></th>
|
||||
<th class='w-120px'> <?php echo $lang->bug->module;?> <span class='required'></span></th>
|
||||
<th class='w-130px<?php echo zget($visibleFields, 'project', ' hidden')?>'><?php echo $lang->bug->project;?></th>
|
||||
<th class='w-130px<?php echo zget($visibleFields, 'project', ' hidden')?>'>
|
||||
<?php echo $lang->bug->project;?>
|
||||
<?php if(isset($requiredFields['project'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th><?php echo $lang->bug->openedBuild;?> <span class='required'></span></th>
|
||||
<th><?php echo $lang->bug->title;?> <span class='required'></span></th>
|
||||
<th class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo $lang->bug->steps;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden')?>'> <?php echo $lang->typeAB;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->bug->pri;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'severity', ' hidden')?>'><?php echo $lang->bug->severity;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'os', ' hidden')?>'> <?php echo $lang->bug->os;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden')?>'><?php echo $lang->bug->browser;?></th>
|
||||
<th class='<?php echo zget($visibleFields, 'keywords', ' hidden')?>'> <?php echo $lang->bug->keywords;?></th>
|
||||
<th class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'>
|
||||
<?php echo $lang->bug->deadline;?>
|
||||
<?php if(isset($requiredFields['deadline'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'>
|
||||
<?php echo $lang->bug->steps;?>
|
||||
<?php if(isset($requiredFields['steps'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden')?>'>
|
||||
<?php echo $lang->typeAB;?>
|
||||
<?php if(isset($requiredFields['type'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
|
||||
<?php echo $lang->bug->pri;?>
|
||||
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'severity', ' hidden')?>'>
|
||||
<?php echo $lang->bug->severity;?>
|
||||
<?php if(isset($requiredFields['severity'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'os', ' hidden')?>'>
|
||||
<?php echo $lang->bug->os;?>
|
||||
<?php if(isset($requiredFields['os'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden')?>'>
|
||||
<?php echo $lang->bug->browser;?>
|
||||
<?php if(isset($requiredFields['browser'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='<?php echo zget($visibleFields, 'keywords', ' hidden')?>'>
|
||||
<?php echo $lang->bug->keywords;?>
|
||||
<?php if(isset($requiredFields['keywords'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -89,7 +127,8 @@ foreach(explode(',', $showFields) as $field)
|
||||
<?php echo html::input("title[$i]", $bugTitle, "class='form-control' autocomplete='off'") . html::hidden("uploadImage[$i]", $fileName);?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '', "class='form-control chosen'");?></td>
|
||||
@@ -122,7 +161,8 @@ foreach(explode(',', $showFields) as $field)
|
||||
<?php echo html::input("title[$i]", '', "class='form-control' autocomplete='off'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '', "class='form-control chosen'");?></td>
|
||||
@@ -151,7 +191,8 @@ foreach(explode(',', $showFields) as $field)
|
||||
<?php echo html::input("title[%s]", '', "class='form-control' autocomplete='off'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[%s]", '', "class='form-control form-date'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[%s]", $lang->bug->typeList, $type, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[%s]", $lang->bug->priList, '', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[%s]", $lang->bug->severityList, '', "class='form-control'");?></td>
|
||||
|
||||
@@ -26,11 +26,20 @@
|
||||
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
|
||||
<?php else:?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->bug->edit->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->bug->list->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
$columns = count($visibleFields) + 2;
|
||||
?>
|
||||
<form class='form-condensed' method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "productID=$productID");?>">
|
||||
@@ -38,20 +47,47 @@ $columns = count($visibleFields) + 2;
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-110px<?php echo zget($visibleFields, 'type', ' hidden')?>'><?php echo $lang->bug->type;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'severity', ' hidden')?>'><?php echo $lang->bug->severityAB;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'><?php echo $lang->bug->pri;?></th>
|
||||
<th class='w-110px<?php echo zget($visibleFields, 'type', ' hidden')?>'>
|
||||
<?php echo $lang->bug->type;?>
|
||||
<?php if(isset($requiredFields['type'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'severity', ' hidden')?>'>
|
||||
<?php echo $lang->bug->severityAB;?>
|
||||
<?php if(isset($requiredFields['severity'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
|
||||
<?php echo $lang->bug->pri;?>
|
||||
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th <?php if(count($visibleFields) >= 10) echo "class='w-150px'"?>><?php echo $lang->bug->title;?> <span class='required'></span></th>
|
||||
<?php if($branchProduct):?>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'branch', ' hidden')?>'><?php echo $lang->bug->branch;?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'productplan', ' hidden')?>'><?php echo $lang->bug->productplan;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'><?php echo $lang->bug->assignedTo;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden')?>'><?php echo $lang->bug->deadline;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'productplan', ' hidden')?>'>
|
||||
<?php echo $lang->bug->productplan;?>
|
||||
<?php if(isset($requiredFields['productplan'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'>
|
||||
<?php echo $lang->bug->assignedTo;?>
|
||||
<?php if(isset($requiredFields['assignedTo'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden')?>'>
|
||||
<?php echo $lang->bug->deadline;?>
|
||||
<?php if(isset($requiredFields['deadline'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-90px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->bug->status;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'os', ' hidden')?>'><?php echo $lang->bug->os;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden')?>'><?php echo $lang->bug->browser;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'><?php echo $lang->bug->keywords;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'os', ' hidden')?>'>
|
||||
<?php echo $lang->bug->os;?>
|
||||
<?php if(isset($requiredFields['os'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden')?>'>
|
||||
<?php echo $lang->bug->browser;?>
|
||||
<?php if(isset($requiredFields['browser'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'>
|
||||
<?php echo $lang->bug->keywords;?>
|
||||
<?php if(isset($requiredFields['keywords'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'resolvedBy', ' hidden')?>'><?php echo $lang->bug->resolvedByAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'resolution', ' hidden')?>'><?php echo $lang->bug->resolutionAB;?></th>
|
||||
</tr>
|
||||
|
||||
@@ -30,7 +30,7 @@ $config->custom->requiredModules[85] = 'user';
|
||||
|
||||
$config->custom->fieldList['product']['create'] = 'name,code,line,PO,QD,RD,type,desc';
|
||||
$config->custom->fieldList['product']['edit'] = 'name,code,line,PO,QD,RD,type,desc,status';
|
||||
$config->custom->fieldList['story']['create'] = 'product,plan,source,sourceNote,title,pri,estimate,mailto,keywords,spec,verify';
|
||||
$config->custom->fieldList['story']['create'] = 'module,plan,source,title,pri,estimate,keywords,spec,verify';
|
||||
$config->custom->fieldList['story']['change'] = 'title,spec,verify,comment';
|
||||
$config->custom->fieldList['story']['close'] = 'closedReason,comment';
|
||||
$config->custom->fieldList['story']['review'] = 'reviewedDate,assignedTo,reviewedBy,comment';
|
||||
@@ -38,16 +38,16 @@ $config->custom->fieldList['productplan'] = 'title,begin,end,desc';
|
||||
$config->custom->fieldList['release'] = 'name,build,date,desc';
|
||||
$config->custom->fieldList['project']['create'] = 'name,code,begin,end,days,type,desc';
|
||||
$config->custom->fieldList['project']['edit'] = 'name,code,begin,end,days,type,desc,PO,PM,QD,RD';
|
||||
$config->custom->fieldList['task']['create'] = 'type,story,name,pri,estimate,desc,estStarted,deadline,mailto';
|
||||
$config->custom->fieldList['task']['edit'] = 'type,assignedTo,story,name,pri,estimate,desc,estStarted,deadline,mailto';
|
||||
$config->custom->fieldList['task']['create'] = 'type,story,name,pri,estimate,desc,estStarted,deadline';
|
||||
$config->custom->fieldList['task']['edit'] = 'type,name,pri,estimate,estStarted,deadline';
|
||||
$config->custom->fieldList['task']['finish'] = 'consumed,finishedDate,comment';
|
||||
$config->custom->fieldList['task']['activate'] = 'assignedTo,left,comment';
|
||||
$config->custom->fieldList['build'] = 'product,name,builder,date,scmPath,filePath,desc';
|
||||
$config->custom->fieldList['bug']['create'] = 'product,project,openedBuild,assignedTo,deadline,type,os,browser,title,severity,pri,steps,story,task,mailto,keywords';
|
||||
$config->custom->fieldList['bug']['edit'] = 'product,plan,project,openedBuild,assignedTo,deadline,type,os,browser,title,severity,pri,steps,story,task,mailto,keywords';
|
||||
$config->custom->fieldList['bug']['create'] = 'module,project,openedBuild,deadline,type,os,browser,title,severity,pri,steps,keywords';
|
||||
$config->custom->fieldList['bug']['edit'] = 'productplan,openedBuild,assignedTo,deadline,type,os,browser,title,severity,pri,steps,keywords';
|
||||
$config->custom->fieldList['bug']['resolve'] = 'resolution,resolvedBuild,resolvedDate,assignedTo,comment';
|
||||
$config->custom->fieldList['testcase']['create'] = 'product,type,stage,story,title,pri,precondition,keywords';
|
||||
$config->custom->fieldList['testcase']['edit'] = 'product,type,stage,story,title,pri,precondition,keywords,status';
|
||||
$config->custom->fieldList['testcase']['create'] = 'type,stage,story,title,pri,precondition,keywords';
|
||||
$config->custom->fieldList['testcase']['edit'] = 'type,stage,story,title,pri,precondition,keywords,status';
|
||||
$config->custom->fieldList['testsuite'] = 'name,desc';
|
||||
$config->custom->fieldList['testcase']['createcase'] = 'lib,type,stage,title,pri,precondition,keywords';
|
||||
$config->custom->fieldList['testreport'] = 'begin,end,owner,members,title,report';
|
||||
|
||||
@@ -20,10 +20,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->product->edit->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->product->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form class='form-condensed' method='post' target='hiddenwin' action='<?php echo inLink('batchEdit');?>'>
|
||||
@@ -33,18 +42,39 @@ foreach(explode(',', $showFields) as $field)
|
||||
<th class='w-id'> <?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->product->name;?> <span class='required'></span></th>
|
||||
<th class='w-150px'><?php echo $lang->product->code;?> <span class='required'></span></th>
|
||||
<th class='w-150px'><?php echo $lang->product->line;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'PO', ' hidden')?>'><?php echo $lang->product->PO;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'QD', ' hidden')?>'><?php echo $lang->product->QD;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'RD', ' hidden')?>'><?php echo $lang->product->RD;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden')?>'><?php echo $lang->product->type;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->product->status;?></th>
|
||||
<th class='w-200px<?php echo zget($visibleFields, 'desc', ' hidden')?>'><?php echo $lang->product->desc;?></th>
|
||||
<th class='w-150px'>
|
||||
<?php echo $lang->product->line;?>
|
||||
<?php if(isset($requiredFields['line'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php if(!isset($visibleFields['PO'])) echo ' hidden';?>'>
|
||||
<?php echo $lang->product->PO;?>
|
||||
<?php if(isset($requiredFields['PO'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php if(!isset($visibleFields['QD'])) echo ' hidden';?>'>
|
||||
<?php echo $lang->product->QD;?>
|
||||
<?php if(isset($requiredFields['QD'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php if(!isset($visibleFields['RD'])) echo ' hidden';?>'>
|
||||
<?php echo $lang->product->RD;?>
|
||||
<?php if(isset($requiredFields['RD'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php if(!isset($visibleFields['type'])) echo ' hidden';?>'>
|
||||
<?php echo $lang->product->type;?>
|
||||
<?php if(isset($requiredFields['type'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php if(!isset($visibleFields['status'])) echo ' hidden';?>'>
|
||||
<?php echo $lang->product->status;?>
|
||||
<?php if(isset($requiredFields['status'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-200px<?php if(!isset($visibleFields['desc'])) echo ' hidden';?>'>
|
||||
<?php echo $lang->product->desc;?>
|
||||
<?php if(isset($requiredFields['desc'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-80px'><?php echo $lang->product->order;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class='text-center'>
|
||||
<?php foreach($productIDList as $productID):?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo sprintf('%03d', $productID) . html::hidden("productIDList[$productID]", $productID);?></td>
|
||||
<td title='<?php echo $products[$productID]->name?>'><?php echo html::input("names[$productID]", $products[$productID]->name, "class='form-control' autocomplete='off'");?></td>
|
||||
<td><?php echo html::input("codes[$productID]", $products[$productID]->code, "class='form-control' autocomplete='off'");?></td>
|
||||
|
||||
@@ -71,15 +71,13 @@
|
||||
<?php if($this->session->currentProductType != 'normal'):?>
|
||||
<td><?php echo $branches[$plan->branch];?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $plan->begin;?></td>
|
||||
<td><?php echo $plan->begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?></td>
|
||||
<td><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
|
||||
<td class='text-center'><?php echo $plan->stories;?></td>
|
||||
<td class='text-center'><?php echo $plan->bugs;?></td>
|
||||
<td class='text-center'><?php echo $plan->hour;?></td>
|
||||
<td class='text-center'><?php if(!empty($plan->projectID)) echo html::a(helper::createLink('project', 'task', 'projectID=' . $plan->projectID), '<i class="icon-search"></i>');?></td>
|
||||
<td class='text-left content'><div class='article-content'><?php echo $plan->desc;?></div></td>
|
||||
<td><?php echo $plan->begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?></td>
|
||||
<td><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
|
||||
<td class='text-center'>
|
||||
<?php
|
||||
if(common::hasPriv('project', 'create')) echo html::a(helper::createLink('project', 'create', "projectID=©ProjectID=&planID=$plan->id"), '<i class="icon-play"></i>', '', "class='btn-icon' title='{$lang->project->create}'");
|
||||
|
||||
@@ -1025,9 +1025,11 @@ class project extends control
|
||||
|
||||
$allProducts = array(0 => '') + $this->loadModel('product')->getPairs('noclosed|nocode');
|
||||
$linkedProducts = $this->project->getProducts($project->id);
|
||||
$linkedBranches = array();
|
||||
foreach($linkedProducts as $product)
|
||||
{
|
||||
if(!isset($allProducts[$product->id])) $allProducts[$product->id] = $product->name;
|
||||
if($product->branch) $linkedBranches[$product->branch] = $product->branch;
|
||||
}
|
||||
|
||||
$this->view->title = $title;
|
||||
@@ -1041,7 +1043,7 @@ class project extends control
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = $allProducts;
|
||||
$this->view->linkedProducts = $linkedProducts;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts));
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1291,6 +1293,11 @@ class project extends control
|
||||
if(!$project) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$products = $this->project->getProducts($project->id);
|
||||
$linkedBranches = array();
|
||||
foreach($products as $product)
|
||||
{
|
||||
if($product->branch) $linkedBranches[$product->branch] = $product->branch;
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
$this->project->setMenu($this->projects, $project->id);
|
||||
@@ -1301,7 +1308,7 @@ class project extends control
|
||||
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $products;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
|
||||
$this->view->planGroups = $this->project->getPlans($products);
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
@@ -1599,10 +1606,12 @@ class project extends control
|
||||
|
||||
$allProducts = $this->product->getPairs('noclosed|nocode');
|
||||
$linkedProducts = $this->project->getProducts($project->id);
|
||||
$linkedBranches = array();
|
||||
// Merge allProducts and linkedProducts for closed product.
|
||||
foreach($linkedProducts as $product)
|
||||
{
|
||||
if(!isset($allProducts[$product->id])) $allProducts[$product->id] = $product->name;
|
||||
if(!empty($product->branch)) $linkedBranches[$product->branch] = $product->branch;
|
||||
}
|
||||
|
||||
/* Assign. */
|
||||
@@ -1610,7 +1619,7 @@ class project extends control
|
||||
$this->view->position = $position;
|
||||
$this->view->allProducts = $allProducts;
|
||||
$this->view->linkedProducts = $linkedProducts;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($allProducts));
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($allProducts), '', $linkedBranches);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -21,11 +21,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->project->edit->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->project->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
$minWidth = (count($visibleFields) > 5) ? 'w-150px' : '';
|
||||
?>
|
||||
<form class='form-condensed' method='post' target='hiddenwin' action='<?php echo inLink('batchEdit');?>'>
|
||||
@@ -35,17 +44,38 @@ $minWidth = (count($visibleFields) > 5) ? 'w-150px' : '';
|
||||
<th class='w-50px'><?php echo $lang->idAB;?></th>
|
||||
<th class='<?php echo $minWidth?>'><?php echo $lang->project->name;?> <span class='required'></span></th>
|
||||
<th class='w-150px'><?php echo $lang->project->code;?> <span class='required'></span></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'PM', ' hidden')?>'><?php echo $lang->project->PM;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'PO', ' hidden')?>'><?php echo $lang->project->PO;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'QD', ' hidden')?>'><?php echo $lang->project->QD;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'RD', ' hidden')?>'><?php echo $lang->project->RD;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden')?>'><?php echo $lang->project->type;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'PM', ' hidden')?>'>
|
||||
<?php echo $lang->project->PM;?>
|
||||
<?php if(isset($requiredFields['PM'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'PO', ' hidden')?>'>
|
||||
<?php echo $lang->project->PO;?>
|
||||
<?php if(isset($requiredFields['PO'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'QD', ' hidden')?>'>
|
||||
<?php echo $lang->project->QD;?>
|
||||
<?php if(isset($requiredFields['QD'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'RD', ' hidden')?>'>
|
||||
<?php echo $lang->project->RD;?>
|
||||
<?php if(isset($requiredFields['RD'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden')?>'>
|
||||
<?php echo $lang->project->type;?>
|
||||
<?php if(isset($requiredFields['type'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->project->status;?></th>
|
||||
<th class='w-110px'><?php echo $lang->project->begin;?> <span class='required'></span></th>
|
||||
<th class='w-110px'><?php echo $lang->project->end;?> <span class='required'></span></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'desc', ' hidden')?>'> <?php echo $lang->project->desc;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'desc', ' hidden')?>'>
|
||||
<?php echo $lang->project->desc;?>
|
||||
<?php if(isset($requiredFields['desc'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'teamname', ' hidden')?>'><?php echo $lang->project->teamname;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'days', ' hidden')?>'><?php echo $lang->project->days;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'days', ' hidden')?>'>
|
||||
<?php echo $lang->project->days;?>
|
||||
<?php if(isset($requiredFields['days'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-80px'><?php echo $lang->project->order;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -27,29 +27,60 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->story->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->story->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
unset($visibleFields['module']);
|
||||
?>
|
||||
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-30px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo $lang->product->branch;?></th>
|
||||
<th class='w-p15'><?php echo $lang->story->module;?> <span class='required'></span></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'plan', ' hidden')?>'><?php echo $lang->story->plan;?></th>
|
||||
<th <?php if(count($visibleFields) >= 9) echo "class='w-150px'"?>><?php echo $lang->story->title;?> <span class='required'></span></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'spec', ' hidden')?>'><?php echo $lang->story->spec;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo $lang->story->source;?></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'verify', ' hidden')?>'><?php echo $lang->story->verify;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'><?php echo $lang->story->pri;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'estimate', ' hidden')?>'><?php echo $lang->story->estimate;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo $lang->product->branch;?></th>
|
||||
<th class='w-p13'><?php echo $lang->story->module;?> <span class='required'></span></th>
|
||||
<th class='w-p13<?php echo zget($visibleFields, 'plan', ' hidden')?>'>
|
||||
<?php echo $lang->story->plan;?>
|
||||
<?php if(isset($requiredFields['plan'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th <?php if(count($visibleFields) >= 9) echo "class='w-200px'"?>><?php echo $lang->story->title;?> <span class='required'></span></th>
|
||||
<th class='w-p13<?php echo zget($visibleFields, 'spec', ' hidden')?>'>
|
||||
<?php echo $lang->story->spec;?>
|
||||
<?php if(isset($requiredFields['spec'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'source', ' hidden')?>'>
|
||||
<?php echo $lang->story->source;?>
|
||||
<?php if(isset($requiredFields['source'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-p12<?php echo zget($visibleFields, 'verify', ' hidden')?>'>
|
||||
<?php echo $lang->story->verify;?>
|
||||
<?php if(isset($requiredFields['verify'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
|
||||
<?php echo $lang->story->pri;?>
|
||||
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'estimate', ' hidden')?>'>
|
||||
<?php echo $lang->story->estimate;?>
|
||||
<?php if(isset($requiredFields['estimate'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'review', ' hidden')?>'><?php echo $lang->story->review;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'><?php echo $lang->story->keywords;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'>
|
||||
<?php echo $lang->story->keywords;?>
|
||||
<?php if(isset($requiredFields['keywords'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $i = 0; ?>
|
||||
@@ -62,7 +93,7 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control' onchange='setModuleAndPlan(this.value, $productID, $i)'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[$i]", $plans, $planID, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
@@ -94,7 +125,7 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control chosen' onchange='setModuleAndPlan(this.value, $productID, $i)'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[$i]", $plans, $planID, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
@@ -122,7 +153,7 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<tr class='text-center'>
|
||||
<td>%s</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branch[%s]", $branches, $branch, "class='form-control' onchange='setModuleAndPlan(this.value, $productID, \"%s\")'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module')?>' style='overflow:visible'><?php echo html::select("module[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("module[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[%s]", $plans, $planID, "class='form-control'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
|
||||
@@ -87,7 +87,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<?php echo html::select("branches[$storyID]", $branches, $story->branch, "class='form-control chosen' onchange='loadBranches($branchProductID, this.value, $storyID);' $disabled");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module')?>' style='overflow:visible'>
|
||||
<?php echo html::select("modules[$storyID]", $modules, $story->module, "class='form-control chosen'");?>
|
||||
</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'>
|
||||
|
||||
@@ -24,11 +24,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->task->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->task->custom->batchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
$colspan = count($visibleFields) + 3;
|
||||
$hiddenStory = ((isonlybody() and $storyID) || $this->config->global->flow == 'onlyTask') ? ' hidden' : '';
|
||||
if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
|
||||
@@ -39,15 +48,35 @@ if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
|
||||
<tr class='text-center'>
|
||||
<th class='w-30px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->task->module?></th>
|
||||
<?php if($project->type != 'ops'):?><th class='w-200px<?php echo zget($visibleFields, 'story', ' hidden'); echo $hiddenStory;?>'><?php echo $lang->task->story;?></th><?php endif;?>
|
||||
<?php if($project->type != 'ops'):?>
|
||||
<th class='w-200px<?php echo zget($visibleFields, 'story', ' hidden'); echo $hiddenStory;?>'>
|
||||
<?php echo $lang->task->story;?>
|
||||
<?php if(isset($requiredFields['story'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<?php endif;?>
|
||||
<th><?php echo $lang->task->name;?> <span class='required'></span></th>
|
||||
<th class='w-80px'><?php echo $lang->typeAB;?> <span class='required'></span></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-50px<?php echo zget($visibleFields, 'estimate', ' hidden')?>'><?php echo $lang->task->estimateAB;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'estStarted', ' hidden')?>'><?php echo $lang->task->estStarted;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden')?>'><?php echo $lang->task->deadline;?></th>
|
||||
<th class='w-p20<?php echo zget($visibleFields, 'desc', ' hidden')?>'><?php echo $lang->task->desc;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'><?php echo $lang->task->pri;?></th>
|
||||
<th class='w-50px<?php echo zget($visibleFields, 'estimate', ' hidden')?>'>
|
||||
<?php echo $lang->task->estimateAB;?>
|
||||
<?php if(isset($requiredFields['estimate'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'estStarted', ' hidden')?>'>
|
||||
<?php echo $lang->task->estStarted;?>
|
||||
<?php if(isset($requiredFields['estStarted'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden')?>'>
|
||||
<?php echo $lang->task->deadline;?>
|
||||
<?php if(isset($requiredFields['deadline'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-p20<?php echo zget($visibleFields, 'desc', ' hidden')?>'>
|
||||
<?php echo $lang->task->desc;?>
|
||||
<?php if(isset($requiredFields['desc'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
|
||||
<?php echo $lang->task->pri;?>
|
||||
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
@@ -26,11 +26,20 @@
|
||||
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
|
||||
<?php else:?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->task->edit->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->task->custom->batchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form class='form-condensed' method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "projectID={$projectID}")?>">
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
@@ -42,12 +51,24 @@ foreach(explode(',', $showFields) as $field)
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-80px'><?php echo $lang->typeAB;?> <span class='required'></span></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->task->status;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'><?php echo $lang->task->pri;?></th>
|
||||
<th class='w-40px<?php echo zget($visibleFields, 'estimate', ' hidden')?>'><?php echo $lang->task->estimateAB;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
|
||||
<?php echo $lang->task->pri;?>
|
||||
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-40px<?php echo zget($visibleFields, 'estimate', ' hidden')?>'>
|
||||
<?php echo $lang->task->estimateAB;?>
|
||||
<?php if(isset($requiredFields['estimate'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-50px<?php echo zget($visibleFields, 'record', ' hidden')?>'><?php echo $lang->task->consumedThisTime?></th>
|
||||
<th class='w-40px<?php echo zget($visibleFields, 'left', ' hidden')?>'><?php echo $lang->task->leftAB?></th>
|
||||
<th class='w-90px<?php echo zget($visibleFields, 'estStarted', ' hidden')?>'><?php echo $lang->task->estStarted?></th>
|
||||
<th class='w-90px<?php echo zget($visibleFields, 'deadline', ' hidden')?>'><?php echo $lang->task->deadline?></th>
|
||||
<th class='w-90px<?php echo zget($visibleFields, 'estStarted', ' hidden')?>'>
|
||||
<?php echo $lang->task->estStarted?>
|
||||
<?php if(isset($requiredFields['estStarted'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-90px<?php echo zget($visibleFields, 'deadline', ' hidden')?>'>
|
||||
<?php echo $lang->task->deadline?>
|
||||
<?php if(isset($requiredFields['deadline'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'finishedBy', ' hidden')?>'><?php echo $lang->task->finishedBy;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'canceledBy', ' hidden')?>'><?php echo $lang->task->canceledBy;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'closedBy', ' hidden')?>'><?php echo $lang->task->closedBy;?></th>
|
||||
|
||||
@@ -32,11 +32,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->testcase->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->bug->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
$colspan = count($visibleFields) + 3;
|
||||
$hiddenStory = (isonlybody() and $story) ? ' hidden' : '';
|
||||
if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
|
||||
@@ -48,14 +57,29 @@ if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
|
||||
<th class='w-50px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo $lang->product->branch;?></th>
|
||||
<th class='w-180px<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->testcase->module;?></th>
|
||||
<th class='w-180px<?php echo zget($visibleFields, 'story', ' hidden'); echo $hiddenStory;?>'> <?php echo $lang->testcase->story;?></th>
|
||||
<th class='w-180px<?php echo zget($visibleFields, 'story', ' hidden'); echo $hiddenStory;?>'>
|
||||
<?php echo $lang->testcase->story;?>
|
||||
<?php if(isset($requiredFields['story'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th><?php echo $lang->testcase->title;?> <span class='required'></span></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->type;?> <span class='required'></span></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->testcase->pri;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'precondition', ' hidden')?>'><?php echo $lang->testcase->precondition;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'> <?php echo $lang->testcase->keywords;?></th>
|
||||
<th class='w-200px<?php echo zget($visibleFields, 'stage', ' hidden')?>'> <?php echo $lang->testcase->stage;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'review', ' hidden')?>'> <?php echo $lang->testcase->review;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
|
||||
<?php echo $lang->testcase->pri;?>
|
||||
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'precondition', ' hidden')?>'>
|
||||
<?php echo $lang->testcase->precondition;?>
|
||||
<?php if(isset($requiredFields['precondition'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'>
|
||||
<?php echo $lang->testcase->keywords;?>
|
||||
<?php if(isset($requiredFields['keywords'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-200px<?php echo zget($visibleFields, 'stage', ' hidden')?>'>
|
||||
<?php echo $lang->testcase->stage;?>
|
||||
<?php if(isset($requiredFields['stage'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'review', ' hidden')?>'><?php echo $lang->testcase->review;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
@@ -25,29 +25,56 @@
|
||||
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
|
||||
<?php else:?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->testcase->edit->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->bug->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form class='form-condensed' method='post' target='hiddenwin' action="<?php echo inLink('batchEdit');?>">
|
||||
<table class='table table-form table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->priAB;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
|
||||
<?php echo $lang->priAB;?>
|
||||
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'>
|
||||
<?php echo $lang->statusAB;?>
|
||||
<?php if(isset($requiredFields['status'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<?php if($branchProduct):?>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'branch', ' hidden')?>'><?php echo $lang->testcase->branch;?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->testcase->module;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'story', ' hidden')?>'><?php echo $lang->testcase->story;?></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class='w-120px'><?php echo $lang->testcase->type;?></th>
|
||||
<th class='<?php echo zget($visibleFields, 'precondition', 'hidden')?>'> <?php echo $lang->testcase->precondition;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'><?php echo $lang->testcase->keywords;?></th>
|
||||
<th class='w-300px<?php echo zget($visibleFields, 'stage', ' hidden')?>'> <?php echo $lang->testcase->stage;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'story', ' hidden')?>'>
|
||||
<?php echo $lang->testcase->story;?>
|
||||
<?php if(isset($requiredFields['story'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th><?php echo $lang->testcase->title;?> <span class='required'></span></th>
|
||||
<th class='w-120px'><?php echo $lang->testcase->type;?> <span class='required'></span></th>
|
||||
<th class='<?php echo zget($visibleFields, 'precondition', 'hidden')?>'>
|
||||
<?php echo $lang->testcase->precondition;?>
|
||||
<?php if(isset($requiredFields['precondition'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'>
|
||||
<?php echo $lang->testcase->keywords;?>
|
||||
<?php if(isset($requiredFields['keywords'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-300px<?php echo zget($visibleFields, 'stage', ' hidden')?>'>
|
||||
<?php echo $lang->testcase->stage;?>
|
||||
<?php if(isset($requiredFields['stage'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
#begin_chosen{width:50% !important;}
|
||||
.switchDate{border-left: none;}
|
||||
#end_chosen .chosen-single{border-left: none;}
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#begin_chosen{width:50% !important;}
|
||||
#end_chosen .chosen-single{border-left: none;}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<td class='w-p25-f'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('date', $date, "class='form-control form-date'");?>
|
||||
<span class='input-group-addon'><input type='checkbox' id='switchDate' onclick='switchDateTodo(this);'> <?php echo $lang->todo->periods['future'];?></span>
|
||||
<span class='input-group-addon switchDate'><input type='checkbox' id='switchDate' onclick='switchDateTodo(this);'> <?php echo $lang->todo->periods['future'];?></span>
|
||||
<span class='input-group-addon'><input type='checkbox' id='cycle' name='cycle' value='1'> <?php echo $lang->todo->cycle;?></span>
|
||||
</div>
|
||||
</td><td></td>
|
||||
|
||||
@@ -36,8 +36,8 @@ $minWidth = (count($visibleFields) > 7) ? 'w-120px' : '';
|
||||
<tr>
|
||||
<th class='w-30px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'dept', ' hidden')?>'> <?php echo $lang->user->dept;?></th>
|
||||
<th class='<?php echo $minWidth?>'><?php echo $lang->user->account;?></th>
|
||||
<th class='<?php echo $minWidth?>'><?php echo $lang->user->realname;?></th>
|
||||
<th class='<?php echo $minWidth?>'><?php echo $lang->user->account;?> <span class='required'></span></th>
|
||||
<th class='<?php echo $minWidth?>'><?php echo $lang->user->realname;?> <span class='required'></span></th>
|
||||
<th class='w-120px'><?php echo $lang->user->role;?></th>
|
||||
<th class='<?php echo $minWidth . zget($visibleFields, 'commiter', ' hidden')?>'><?php echo $lang->user->commiter;?></th>
|
||||
<th class='<?php echo $minWidth . zget($visibleFields, 'email', ' hidden')?>'> <?php echo $lang->user->email;?></th>
|
||||
|
||||
@@ -227,16 +227,13 @@ class webhookModel extends model
|
||||
|
||||
$mobile = '';
|
||||
$email = '';
|
||||
if($actionType == 'assigned')
|
||||
foreach($users as $user)
|
||||
{
|
||||
foreach($users as $user)
|
||||
if($user->account == $object->assignedTo)
|
||||
{
|
||||
if($user->account == $object->assignedTo)
|
||||
{
|
||||
$mobile = $user->mobile;
|
||||
$email = $user->email;
|
||||
break;
|
||||
}
|
||||
$mobile = $user->mobile;
|
||||
$email = $user->email;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$action->text = $text;
|
||||
|
||||
Reference in New Issue
Block a user