summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-10-29 06:14:56 +0000
committerGo MAEDA <maeda@farend.jp>2018-10-29 06:14:56 +0000
commitbae9ffd327d98a2129510a898780d38ddba67b99 (patch)
treea797c2962722b1d08955ab3a8c8314b485dd35ee /app
parentd3ffa9252ca3461929e8974ef15f2dbde6803431 (diff)
downloadredmine-bae9ffd327d98a2129510a898780d38ddba67b99.tar.gz
redmine-bae9ffd327d98a2129510a898780d38ddba67b99.zip
Filter out issues from closed projects in the following widgets (#29449):
* Issues assigned to me * Reported issues * Watched issues Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17611 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/my_helper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb
index df0c4cf1d..91d21736c 100644
--- a/app/helpers/my_helper.rb
+++ b/app/helpers/my_helper.rb
@@ -96,6 +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.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)
@@ -106,6 +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.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
query.sort_criteria = settings[:sort].presence || [['updated_on', 'desc']]
issues = query.issues(:limit => 10)
@@ -116,6 +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.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject']
query.sort_criteria = settings[:sort].presence || [['updated_on', 'desc']]
issues = query.issues(:limit => 10)