summaryrefslogtreecommitdiffstats
path: root/app/models/issue_query.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-10-04 12:46:32 +0000
committerGo MAEDA <maeda@farend.jp>2018-10-04 12:46:32 +0000
commit28c231473f98a4b184204dd53cbeee1e0d655853 (patch)
treeaecf6718ddbcef587a0fad04baf755fb4627f748 /app/models/issue_query.rb
parentf199fd54b7bf404aa9d75134a55b6b4275a75ef1 (diff)
downloadredmine-28c231473f98a4b184204dd53cbeee1e0d655853.tar.gz
redmine-28c231473f98a4b184204dd53cbeee1e0d655853.zip
Custom queries are broken by updating with nil parameter values (#29701).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17566 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r--app/models/issue_query.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb
index c342dc456..38946f75a 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -75,8 +75,8 @@ class IssueQuery < Query
def build_from_params(params, defaults={})
super
- self.draw_relations = params[:draw_relations] || (params[:query] && params[:query][:draw_relations])
- self.draw_progress_line = params[:draw_progress_line] || (params[:query] && params[:query][:draw_progress_line])
+ self.draw_relations = params[:draw_relations] || (params[:query] && params[:query][:draw_relations]) || options[:draw_relations]
+ self.draw_progress_line = params[:draw_progress_line] || (params[:query] && params[:query][:draw_progress_line]) || options[:draw_progress_line]
self
end