* Fix an error.

This commit is contained in:
hufangzhou
2020-11-27 10:29:57 +08:00
parent 6c6d177c84
commit 9ce4ed5e75
2 changed files with 9 additions and 3 deletions
+4 -2
View File
@@ -42,7 +42,7 @@
<?php else:?>
<form id='myStoryForm' class="main-table table-story" data-ride="table" method="post">
<table id='storyList' class="table has-sort-head table-fixed">
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<?php $vars = "type=$type&storyType=$storyType&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<?php
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = (common::hasPriv('story', 'batchClose') and strtolower($type) != 'closedby');
@@ -63,7 +63,7 @@
</th>
<th class='c-pri w-40px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-product'> <?php common::printOrderLink('productTitle', $orderBy, $vars, $lang->story->product);?></th>
<th class='c-name'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th class='c-name'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->my->name);?></th>
<?php if($storyType == 'story'):?>
<th class='c-plan'> <?php common::printOrderLink('plan', $orderBy, $vars, $lang->story->plan);?></th>
<?php endif;?>
@@ -138,7 +138,9 @@
<td class='c-name nobr'>
<?php echo '<span class="label label-badge label-light" title="' . $this->lang->story->children .'">' . $this->lang->story->childrenAB . '</span> ' . html::a($storyLink, $child->title, null, "style='color: $child->color'");?>
</td>
<?php if($storyType == 'story'):?>
<td class='c-plan'><?php echo $child->planTitle;?></td>
<?php endif;?>
<td class='c-user'><?php echo zget($users, $child->openedBy);?></td>
<td class='c-hours'><?php echo $child->estimate;?></td>
<td class='c-status'><span class='status-story status-<?php echo $child->status;?>'> <?php echo $this->processStatus('story', $child);?></span></td>
+5 -1
View File
@@ -82,8 +82,12 @@ class storyModel extends model
*/
public function getByList($storyIdList = 0, $type = 'story')
{
return $this->dao->select('t1.*, t2.spec, t2.verify')->from(TABLE_STORY)->alias('t1')
return $this->dao->select('t1.*, t2.spec, t2.verify, t3.name as productTitle')
->markLeft()
->from(TABLE_STORY)->alias('t1')
->leftJoin(TABLE_STORYSPEC)->alias('t2')->on('t1.id=t2.story')
->markRight()
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id')
->where('t1.deleted')->eq(0)
->andWhere('t1.version=t2.version')
->beginIF($storyIdList)->andWhere('t1.id')->in($storyIdList)->fi()