diff options
author | Go MAEDA <maeda@farend.jp> | 2019-12-02 01:37:49 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-12-02 01:37:49 +0000 |
commit | 45fb27d5afaa6b274f34c60c31236c167b2d2ae0 (patch) | |
tree | b4859006b413571eb730f173a5ff7823d81daa00 /app | |
parent | f7fcd111e9b0e127950634435bf4e63d0f69d4bf (diff) | |
download | redmine-45fb27d5afaa6b274f34c60c31236c167b2d2ae0.tar.gz redmine-45fb27d5afaa6b274f34c60c31236c167b2d2ae0.zip |
Fix that bookmarked and recently used projects are unexpectedly filtered by a search keyword after full-text search (#31355, #32503).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@19325 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ab4849957..b76ade5d8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -477,8 +477,9 @@ module ApplicationHelper def render_projects_for_jump_box(projects, selected=nil) jump_box = Redmine::ProjectJumpBox.new User.current - bookmarked = jump_box.bookmarked_projects(params[:q]) - recents = jump_box.recently_used_projects(params[:q]) + query = params[:q] if request.format.js? + bookmarked = jump_box.bookmarked_projects(query) + recents = jump_box.recently_used_projects(query) projects = projects - (recents + bookmarked) projects_label = (bookmarked.any? || recents.any?) ? :label_optgroup_others : :label_project_plural jump = params[:jump].presence || current_menu_item |