created-by-me filter for issues inside project. Fixed global project.issues order

This commit is contained in:
Dmitriy Zaporozhets 2013-02-28 17:46:28 +02:00
parent 15b121d603
commit 115454f3ed
5 changed files with 14 additions and 5 deletions

View file

@ -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?