diff options
author | Go MAEDA <maeda@farend.jp> | 2018-10-29 07:01:51 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-10-29 07:01:51 +0000 |
commit | 5f96648717dd450b06ff11c1c254d3831fab2bdd (patch) | |
tree | c405d629759d7bfdeb62fa8597816766b059bfda /app/helpers | |
parent | bae9ffd327d98a2129510a898780d38ddba67b99 (diff) | |
download | redmine-5f96648717dd450b06ff11c1c254d3831fab2bdd.tar.gz redmine-5f96648717dd450b06ff11c1c254d3831fab2bdd.zip |
Use Project::STATUS_ACTIVE constant instead of harcoded 1 (#29449).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17612 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/my_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index 91d21736c..a4b35d890 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -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) |