* adjust for task #3983.

This commit is contained in:
wangyidong
2018-05-16 11:04:14 +08:00
parent 517aa12411
commit ed3529f546
2 changed files with 14 additions and 13 deletions
+8 -11
View File
@@ -52,7 +52,7 @@
<th class='w-60px'> <?php echo $lang->productplan->hour;?></th>
<th class='w-60px'> <?php echo $lang->productplan->project;?></th>
<th> <?php echo $lang->productplan->desc;?></th>
<th class='c-actions-3'><?php echo $lang->actions;?></th>
<th class='c-actions-4'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -77,22 +77,19 @@
<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 class='text-left content'><div class='article-content'><?php echo strip_tags($plan->desc, str_replace('<img>', '', $config->allowedTags));?></div></td>
<td class='c-actions'>
<div class='more'>
<?php
if(common::hasPriv('productplan', 'delete', $plan))
{
$deleteURL = $this->createLink('productplan', 'delete', "planID=$plan->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"productplan\",confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn btn-icon' title='{$lang->productplan->delete}'");
}
?>
</div>
<?php
if(common::hasPriv('project', 'create')) echo html::a(helper::createLink('project', 'create', "projectID=&copyProjectID=&planID=$plan->id"), '<i class="icon-play"></i>', '', "class='btn' title='{$lang->project->create}'");
if(common::hasPriv('productplan', 'linkStory')) echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=id_desc&link=true"), '<i class="icon-link"></i>', '', "class='btn' title='{$lang->productplan->linkStory}'");
if(common::hasPriv('productplan', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=id_desc&link=true"), '<i class="icon-bug"></i>', '', "class='btn' title='{$lang->productplan->linkBug}'");
common::printIcon('productplan', 'edit', "planID=$plan->id", $plan, 'list');
if(common::hasPriv('productplan', 'delete', $plan))
{
$deleteURL = $this->createLink('productplan', 'delete', "planID=$plan->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"productplan\",confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn btn-icon' title='{$lang->productplan->delete}'");
}
?>
</td>
</tr>
+6 -2
View File
@@ -222,6 +222,7 @@ class upgradeModel extends model
}
$this->deletePatch();
return true;
}
/**
@@ -2133,12 +2134,15 @@ class upgradeModel extends model
*/
public function fixTaskAssignedTo()
{
$minParent = $this->dao->select('parent')->from(TABLE_TASK)->where('parent')->ne(0)->orderBy('parent')->limit(1)->fetch();
if(empty($minParent)) return true;
$needUpdateTasks = $this->dao->select('id,parent,closedBy')->from(TABLE_TASK)
->where('status')->eq('closed')
->andWhere('assignedTo')->ne('closed')
->andWhere('id')->ge($minParent)
->fetchAll('id');
if(!$needUpdateTasks) return true;
if(empty($needUpdateTasks)) return true;
$needUpdateParentTasks = array();
$needUpdateChildTasks = array();