From: Go MAEDA Date: Mon, 29 Oct 2018 07:01:51 +0000 (+0000) Subject: Use Project::STATUS_ACTIVE constant instead of harcoded 1 (#29449). X-Git-Tag: 4.0.0~72 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5f96648717dd450b06ff11c1c254d3831fab2bdd;p=redmine.git 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 --- 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)