From e89cb8829eaff9170d3874670be5f9f6b287df56 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 25 Jun 2017 08:51:53 +0000 Subject: [PATCH] Fix project jump box text when creating/editing a project (#23310). git-svn-id: http://svn.redmine.org/redmine/trunk@16687 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d6264b653..2048f13b7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -377,7 +377,10 @@ module ApplicationHelper # Renders the project quick-jump box def render_project_jump_box projects = projects_for_jump_box(User.current) - text = @project.try(:name) || l(:label_jump_to_a_project) + if @project && @project.persisted? + text = @project.name_was + end + text ||= l(:label_jump_to_a_project) url = autocomplete_projects_path(:format => 'js', :jump => current_menu_item) trigger = content_tag('span', text, :class => 'drdn-trigger') -- 2.39.5