diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-10-01 08:13:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-10-01 08:13:40 +0000 |
commit | 7daa5b750fe657f662247868e8a8db89ee5b29a6 (patch) | |
tree | 0fe1b7158fd634cef8df5fc1b04e065a7061b358 /app | |
parent | 1673a9540bc7551d9b115673de524939b60689ba (diff) | |
download | redmine-7daa5b750fe657f662247868e8a8db89ee5b29a6.tar.gz redmine-7daa5b750fe657f662247868e8a8db89ee5b29a6.zip |
Previous/Next navigation on a issue is not displayed on r15639 and later (#23781).
git-svn-id: http://svn.redmine.org/redmine/trunk@15850 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/queries_helper.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 6bf8b3177..57a45312e 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -262,16 +262,19 @@ module QueriesHelper end end - def retrieve_query_from_session - if session[:query] - if session[:query][:id] - @query = IssueQuery.find_by_id(session[:query][:id]) + def retrieve_query_from_session(klass=IssueQuery) + session_key = klass.name.underscore.to_sym + session_data = session[session_key] + + if session_data + if session_data[:id] + @query = IssueQuery.find_by_id(session_data[:id]) return unless @query else - @query = IssueQuery.new(:name => "_", :filters => session[:query][:filters], :group_by => session[:query][:group_by], :column_names => session[:query][:column_names], :totalable_names => session[:query][:totalable_names]) + @query = IssueQuery.new(:name => "_", :filters => session_data[:filters], :group_by => session_data[:group_by], :column_names => session_data[:column_names], :totalable_names => session_data[:totalable_names]) end - if session[:query].has_key?(:project_id) - @query.project_id = session[:query][:project_id] + if session_data.has_key?(:project_id) + @query.project_id = session_data[:project_id] else @query.project = @project end |