Skip to content

Commit

Permalink
Bug: your issues displays open issues only
Browse files Browse the repository at this point in the history
Changed projectsWidthIssues() so that only open issues are returned when open projects are requested.
For archived project we returns all issues
  • Loading branch information
satrun77 committed Jun 19, 2015
1 parent 021abc4 commit b9135a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Model/Traits/User/QueryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ public function projectsWidthIssues($status = Project::STATUS_OPEN)
return $this
->projects($status)
->with([
'issues' => function (Relations\Relation $query) {
'issues' => function (Relations\Relation $query) use ($status) {
$query->with('updatedBy');
$query->where('assigned_to', '=', $this->id);
if ($status === Project::STATUS_OPEN) {
$query->where('status', '=', Project\Issue::STATUS_OPEN);
}
},
'issues.user' => function () {},
'issues.countComments' => function () {},
Expand Down

0 comments on commit b9135a1

Please sign in to comment.