Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -43,7 +43,7 @@ $config->bug->list->customBatchEditFields = 'type,severity,pri,productplan,ass
|
||||
$config->bug->custom = new stdclass();
|
||||
$config->bug->custom->createFields = $config->bug->list->customCreateFields;
|
||||
$config->bug->custom->batchCreateFields = 'module,project,steps,type,severity,os,browser';
|
||||
$config->bug->custom->batchEditFields = 'type,severity,pri,assignedTo,status,resolvedBy,resolution';
|
||||
$config->bug->custom->batchEditFields = 'type,severity,pri,assignedTo,deadline,status,resolvedBy,resolution';
|
||||
|
||||
$config->bug->editor = new stdclass();
|
||||
$config->bug->editor->create = array('id' => 'steps', 'tools' => 'bugTools');
|
||||
|
||||
@@ -201,10 +201,6 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->deadline;?></th>
|
||||
<td><?php echo html::input('deadline', $bug->deadline, "class='form-control form-date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->resolvedBy;?></th>
|
||||
<td><?php echo html::select('resolvedBy', $users, $bug->resolvedBy, "class='form-control chosen'");?></td>
|
||||
|
||||
@@ -166,6 +166,8 @@ class upgradeModel extends model
|
||||
$this->adjustPriv9_0();
|
||||
case '9_0':
|
||||
$this->fixProjectProductData();
|
||||
case '9_0_1':
|
||||
$this->addBugDeadlineToCustomFields();
|
||||
}
|
||||
|
||||
$this->deletePatch();
|
||||
@@ -1587,4 +1589,31 @@ class upgradeModel extends model
|
||||
if(strpos($fromVersion, 'pro') === false ? $fromVersion < '8.3' : $fromVersion < 'pro5.4') $needProcess['updateFile'] = true;
|
||||
return $needProcess;
|
||||
}
|
||||
|
||||
public function addBugDeadlineToCustomFields()
|
||||
{
|
||||
$createFieldsItems = $this->dao->select('id, value')->from(TABLE_CONFIG)
|
||||
->where('module')->eq('bug')
|
||||
->andWhere('section')->eq('custom')
|
||||
->andWhere('`key`')->eq('createFields')
|
||||
->fetchAll();
|
||||
$batchEditFieldsItems = $this->dao->select('id, value')->from(TABLE_CONFIG)
|
||||
->where('module')->eq('bug')
|
||||
->andWhere('section')->eq('custom')
|
||||
->andWhere('`key`')->eq('batchEditFields')
|
||||
->fetchAll();
|
||||
|
||||
foreach($createFieldsItems as $createFieldsItem)
|
||||
{
|
||||
$value = empty($createFieldsItem->value) ? 'deadline' : $createFieldsItem->value . ",deadline";
|
||||
$this->dao->update(TABLE_CONFIG)->set('value')->eq($value)->where('id')->eq($createFieldsItem->id)->exec();
|
||||
}
|
||||
foreach($batchEditFieldsItems as $batchEditFieldsItem)
|
||||
{
|
||||
$value = empty($batchEditFieldsItem->value) ? 'deadline' : $batchEditFieldsItem->value . ",deadline";
|
||||
$this->dao->update(TABLE_CONFIG)->set('value')->eq($value)->where('id')->eq($batchEditFieldsItem->id)->exec();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user