Commit d6249d88 authored by maeda's avatar maeda

Use Project::STATUS_ACTIVE constant instead of harcoded 1 (#29449).

Patch by Marius BALTEANU.


git-svn-id: https://svn.redmine.org/redmine/trunk@17612 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 69b47841
......@@ -96,7 +96,7 @@ module MyHelper
def render_issuesassignedtome_block(block, settings)
query = IssueQuery.new(:name => l(:label_assigned_to_me_issues), :user => User.current)
query.add_filter 'assigned_to_id', '=', ['me']
query.add_filter 'project.status', '=', ['1']
query.add_filter 'project.status', '=', ["#{Project::STATUS_ACTIVE}"]
query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
query.sort_criteria = settings[:sort].presence || [['priority', 'desc'], ['updated_on', 'desc']]
issues = query.issues(:limit => 10)
......@@ -107,7 +107,7 @@ module MyHelper
def render_issuesreportedbyme_block(block, settings)
query = IssueQuery.new(:name => l(:label_reported_issues), :user => User.current)
query.add_filter 'author_id', '=', ['me']
query.add_filter 'project.status', '=', ['1']
query.add_filter 'project.status', '=', ["#{Project::STATUS_ACTIVE}"]
query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
query.sort_criteria = settings[:sort].presence || [['updated_on', 'desc']]
issues = query.issues(:limit => 10)
......@@ -118,7 +118,7 @@ module MyHelper
def render_issueswatched_block(block, settings)
query = IssueQuery.new(:name => l(:label_watched_issues), :user => User.current)
query.add_filter 'watcher_id', '=', ['me']
query.add_filter 'project.status', '=', ['1']
query.add_filter 'project.status', '=', ["#{Project::STATUS_ACTIVE}"]
query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
query.sort_criteria = settings[:sort].presence || [['updated_on', 'desc']]
issues = query.issues(:limit => 10)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment