use_status_active_constant.diff

Marius BALTEANU, 2018-10-29 07:33

Download (1.86 KB)

View differences:

app/helpers/my_helper.rb
96 96
  def render_issuesassignedtome_block(block, settings)
97 97
    query = IssueQuery.new(:name => l(:label_assigned_to_me_issues), :user => User.current)
98 98
    query.add_filter 'assigned_to_id', '=', ['me']
99
    query.add_filter 'project.status', '=', ['1']
99
    query.add_filter 'project.status', '=', ["#{Project::STATUS_ACTIVE}"]
100 100
    query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
101 101
    query.sort_criteria = settings[:sort].presence || [['priority', 'desc'], ['updated_on', 'desc']]
102 102
    issues = query.issues(:limit => 10)
......
107 107
  def render_issuesreportedbyme_block(block, settings)
108 108
    query = IssueQuery.new(:name => l(:label_reported_issues), :user => User.current)
109 109
    query.add_filter 'author_id', '=', ['me']
110
    query.add_filter 'project.status', '=', ['1']
110
    query.add_filter 'project.status', '=', ["#{Project::STATUS_ACTIVE}"]
111 111
    query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
112 112
    query.sort_criteria = settings[:sort].presence || [['updated_on', 'desc']]
113 113
    issues = query.issues(:limit => 10)
......
118 118
  def render_issueswatched_block(block, settings)
119 119
    query = IssueQuery.new(:name => l(:label_watched_issues), :user => User.current)
120 120
    query.add_filter 'watcher_id', '=', ['me']
121
    query.add_filter 'project.status', '=', ['1']
121
    query.add_filter 'project.status', '=', ["#{Project::STATUS_ACTIVE}"]
122 122
    query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
123 123
    query.sort_criteria = settings[:sort].presence || [['updated_on', 'desc']]
124 124
    issues = query.issues(:limit => 10)