diff --git a/module/bug/model.php b/module/bug/model.php index 3ad8b68178..1c04b2e271 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1380,13 +1380,14 @@ class bugModel extends model public function getUserBugs($account, $type = 'assignedTo', $orderBy = 'id_desc', $limit = 0, $pager = null, $projectID = 0) { if(!$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array(); - $bugs = $this->dao->select('*')->from(TABLE_BUG) - ->where('deleted')->eq(0) - ->beginIF($projectID)->andWhere('PRJ')->eq($projectID)->fi() - ->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('status')->ne('closed')->fi() - ->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi() - ->beginIF($this->app->rawMethod == 'contribute')->andWhere("status")->in('resolved,closed')->fi() - ->beginIF($this->app->rawMethod == 'work')->andWhere("status")->eq('active')->fi() + $bugs = $this->dao->select('t1.*,t2.name as productName')->from(TABLE_BUG)->alias('t1') + ->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id') + ->where('t1.deleted')->eq(0) + ->beginIF($projectID)->andWhere('t1.PRJ')->eq($projectID)->fi() + ->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('t1.status')->ne('closed')->fi() + ->beginIF($type != 'all')->andWhere("t1.`$type`")->eq($account)->fi() + ->beginIF($this->app->rawMethod == 'contribute')->andWhere("t1.status")->in('resolved,closed')->fi() + ->beginIF($this->app->rawMethod == 'work')->andWhere("t1.status")->eq('active')->fi() ->orderBy($orderBy) ->beginIF($limit > 0)->limit($limit)->fi() ->page($pager) diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index 500941b405..d9008934e0 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -16,7 +16,7 @@
{$pager->recTotal}"; - echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedTo"), "{$lang->bug->assignedTo}" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'"); + echo html::a(inlink($app->rawMethod, "mode=$mode&type=assignedTo"), "{$lang->bug->assignToMe}" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'"); echo html::a(inlink($app->rawMethod, "mode=$mode&type=openedBy"), "{$lang->bug->openedByMe}" . ($type == 'openedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' ? ' btn-active-text' : '') . "'"); if($app->rawMethod == 'contribute') { @@ -54,12 +54,15 @@ bug->severityAB);?> priAB);?> - typeAB);?> - bug->title);?> - openedByAB);?> - bug->assignedTo);?> - bug->resolvedByAB);?> - bug->resolutionAB);?> + bug->title);?> + bug->product);?> + typeAB);?> + openedByAB);?> + + bug->assignedTo);?> + + bug->resolvedByAB);?> + bug->resolutionAB);?> actions;?> @@ -95,10 +98,13 @@ pri?>' title='bug->priList, $bug->pri);?>'>bug->priList, $bug->pri)?> - bug->typeList, $bug->type, '');?> createLink('bug', 'view', "bugID=$bug->id", '', '', $bug->PRJ), $bug->title, null, "style='color: $bug->color' title={$bug->title}");?> + createLink('product', 'view', "productID=$bug->product", '', '', $bug->PRJ), $bug->productName, null, "title={$bug->productName}");?> + bug->typeList, $bug->type, '');?> openedBy);?> + bug->printAssignedHtml($bug, $users);?> + resolvedBy);?> bug->resolutionList, $bug->resolution);?>