summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-25 08:51:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-25 08:51:53 +0000
commite89cb8829eaff9170d3874670be5f9f6b287df56 (patch)
treeb02ed9dd85378c033650151bc39a6966f5c6efed
parent7fd04e1f8d36d78ee4f680d0a312c9eac2c65e90 (diff)
downloadredmine-e89cb8829eaff9170d3874670be5f9f6b287df56.tar.gz
redmine-e89cb8829eaff9170d3874670be5f9f6b287df56.zip
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
-rw-r--r--app/helpers/application_helper.rb5
1 files changed, 4 insertions, 1 deletions
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')