29449-not-display-closed-project_issues.patch

Yuichi HARADA, 2018-10-02 07:03

Download (1.88 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_available_filter('project.status', :type => :integer)
100
    query.add_filter 'project.status', '=', ["#{Project::STATUS_ACTIVE}"]
99 101
    query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
100 102
    query.sort_criteria = settings[:sort].presence || [['priority', 'desc'], ['updated_on', 'desc']]
101 103
    issues = query.issues(:limit => 10)
......
106 108
  def render_issuesreportedbyme_block(block, settings)
107 109
    query = IssueQuery.new(:name => l(:label_reported_issues), :user => User.current)
108 110
    query.add_filter 'author_id', '=', ['me']
111
    query.add_available_filter('project.status', :type => :integer)
112
    query.add_filter 'project.status', '=', ["#{Project::STATUS_ACTIVE}"]
109 113
    query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
110 114
    query.sort_criteria = settings[:sort].presence || [['updated_on', 'desc']]
111 115
    issues = query.issues(:limit => 10)
app/models/issue_query.rb
543 543
    end
544 544
  end
545 545

  
546
  def sql_for_project_status_field(field, operator, value)
547
    '(' + sql_for_field(field, operator, value, Project.table_name, "status") + ')'
548
  end
549

  
546 550
  def sql_for_relations(field, operator, value, options={})
547 551
    relation_options = IssueRelation::TYPES[field]
548 552
    return relation_options unless relation_options