diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-28 17:46:28 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-28 17:46:28 +0200 |
| commit | 115454f3ed35d136c2edd77296ffff97570a6822 (patch) | |
| tree | 818cdb68c48f4d89c3dbb8ed53d6e3cedff294e2 /app/contexts | |
| parent | 15b121d603db92fe8f08bfb5e55530630e3da18c (diff) | |
| download | gitlab-ce-115454f3ed35d136c2edd77296ffff97570a6822.tar.gz | |
created-by-me filter for issues inside project. Fixed global project.issues order
Diffstat (limited to 'app/contexts')
| -rw-r--r-- | app/contexts/issues_list_context.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/contexts/issues_list_context.rb b/app/contexts/issues_list_context.rb index 0cc73f99535..0765b30c354 100644 --- a/app/contexts/issues_list_context.rb +++ b/app/contexts/issues_list_context.rb @@ -7,12 +7,13 @@ class IssuesListContext < BaseContext @issues = case params[:status] when issues_filter[:all] then @project.issues when issues_filter[:closed] then @project.issues.closed - when issues_filter[:to_me] then @project.issues.opened.assigned(current_user) + when issues_filter[:to_me] then @project.issues.assigned(current_user) + when issues_filter[:by_me] then @project.issues.authored(current_user) else @project.issues.opened end @issues = @issues.tagged_with(params[:label_name]) if params[:label_name].present? - @issues = @issues.includes(:author, :project).order("updated_at") + @issues = @issues.includes(:author, :project) # Filter by specific assignee_id (or lack thereof)? if params[:assignee_id].present? |
