##// END OF EJS Templates
Adds issue id link in the issue creation flash message (#3033)....
Jean-Philippe Lang -
r6090:f208fceccaf9
parent child
Show More
@@ -139,11 +139,11 class IssuesController < ApplicationController
139 139 call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
140 140 if @issue.save
141 141 attachments = Attachment.attach_files(@issue, params[:attachments])
142 render_attachment_warning_if_needed(@issue)
143 flash[:notice] = l(:notice_successful_create)
144 142 call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
145 143 respond_to do |format|
146 144 format.html {
145 render_attachment_warning_if_needed(@issue)
146 flash[:notice] = l(:notice_issue_successful_create, :id => "<a href='#{issue_path(@issue)}'>##{@issue.id}</a>")
147 147 redirect_to(params[:continue] ? { :action => 'new', :project_id => @project, :issue => {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} } :
148 148 { :action => 'show', :id => @issue })
149 149 }
@@ -975,3 +975,4 bg:
975 975 enumeration_doc_categories: Категории документи
976 976 enumeration_activities: Дейности (time tracking)
977 977 enumeration_system_activity: Системна активност
978 notice_issue_successful_create: Issue %{id} created.
@@ -990,3 +990,4 bs:
990 990 label_git_report_last_commit: Report last commit for files and directories
991 991 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
992 992 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
993 notice_issue_successful_create: Issue %{id} created.
@@ -979,3 +979,4 ca:
979 979 label_git_report_last_commit: Report last commit for files and directories
980 980 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
981 981 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
982 notice_issue_successful_create: Issue %{id} created.
@@ -980,3 +980,4 cs:
980 980 label_git_report_last_commit: Report last commit for files and directories
981 981 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
982 982 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
983 notice_issue_successful_create: Issue %{id} created.
@@ -993,3 +993,4 da:
993 993 label_git_report_last_commit: Report last commit for files and directories
994 994 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
995 995 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
996 notice_issue_successful_create: Issue %{id} created.
@@ -995,3 +995,4 de:
995 995 text_scm_config: Die SCM-Kommandos können in der in config/configuration.yml konfiguriert werden. Redmine muss anschließend neu gestartet werden.
996 996 text_scm_command_not_available: Scm Kommando ist nicht verfügbar. Bitte prüfen Sie die Einstellungen im Administrationspanel.
997 997
998 notice_issue_successful_create: Issue %{id} created.
@@ -976,3 +976,4 el:
976 976 label_git_report_last_commit: Report last commit for files and directories
977 977 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
978 978 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
979 notice_issue_successful_create: Issue %{id} created.
@@ -979,3 +979,4 en-GB:
979 979 label_git_report_last_commit: Report last commit for files and directories
980 980 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
981 981 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
982 notice_issue_successful_create: Issue %{id} created.
@@ -171,6 +171,7 en:
171 171 notice_unable_delete_time_entry: Unable to delete time log entry.
172 172 notice_issue_done_ratios_updated: Issue done ratios updated.
173 173 notice_gantt_chart_truncated: "The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max})"
174 notice_issue_successful_create: "Issue %{id} created."
174 175
175 176 error_can_t_load_default_data: "Default configuration could not be loaded: %{value}"
176 177 error_scm_not_found: "The entry or revision was not found in the repository."
@@ -1013,3 +1013,4 es:
1013 1013 label_git_report_last_commit: Informar del último commit para ficheros y directorios
1014 1014 text_scm_config: Puede configurar las órdenes de cada scm en configuration/configuration.yml. Por favor, reinicie la aplicación después de editarlo
1015 1015 text_scm_command_not_available: La orden para el Scm no está disponible. Por favor, compruebe la configuración en el panel de administración.
1016 notice_issue_successful_create: Issue %{id} created.
@@ -980,3 +980,4 eu:
980 980 label_git_report_last_commit: Report last commit for files and directories
981 981 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
982 982 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
983 notice_issue_successful_create: Issue %{id} created.
@@ -979,3 +979,4 fa:
979 979 label_git_report_last_commit: Report last commit for files and directories
980 980 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
981 981 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
982 notice_issue_successful_create: Issue %{id} created.
@@ -997,3 +997,4 fi:
997 997 label_git_report_last_commit: Report last commit for files and directories
998 998 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
999 999 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1000 notice_issue_successful_create: Issue %{id} created.
@@ -185,6 +185,7 fr:
185 185 notice_issue_done_ratios_updated: L'avancement des demandes a été mis à jour.
186 186 notice_api_access_key_reseted: Votre clé d'accès API a été réinitialisée.
187 187 notice_gantt_chart_truncated: "Le diagramme a été tronqué car il excède le nombre maximal d'éléments pouvant être affichés (%{max})"
188 notice_issue_successful_create: "La demande %{id} a été créée."
188 189
189 190 error_can_t_load_default_data: "Une erreur s'est produite lors du chargement du paramétrage : %{value}"
190 191 error_scm_not_found: "L'entrée et/ou la révision demandée n'existe pas dans le dépôt."
@@ -988,3 +988,4 gl:
988 988 label_git_report_last_commit: Report last commit for files and directories
989 989 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
990 990 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
991 notice_issue_successful_create: Issue %{id} created.
@@ -981,3 +981,4 he:
981 981 label_git_report_last_commit: Report last commit for files and directories
982 982 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
983 983 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
984 notice_issue_successful_create: Issue %{id} created.
@@ -983,3 +983,4 hr:
983 983 label_git_report_last_commit: Report last commit for files and directories
984 984 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
985 985 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
986 notice_issue_successful_create: Issue %{id} created.
@@ -995,3 +995,4
995 995 label_git_report_last_commit: Report last commit for files and directories
996 996 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
997 997 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
998 notice_issue_successful_create: Issue %{id} created.
@@ -984,3 +984,4 id:
984 984 label_git_report_last_commit: Report last commit for files and directories
985 985 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
986 986 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
987 notice_issue_successful_create: Issue %{id} created.
@@ -977,3 +977,4 it:
977 977 label_git_report_last_commit: Report last commit for files and directories
978 978 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
979 979 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
980 notice_issue_successful_create: Issue %{id} created.
@@ -1006,3 +1006,4 ja:
1006 1006 permission_set_issues_private: チケットをプライベートに設定
1007 1007 label_issues_visibility_public: プライベートチケット以外
1008 1008 text_issues_destroy_descendants_confirmation: %{count}個の子チケットも削除されます。
1009 notice_issue_successful_create: Issue %{id} created.
@@ -1028,3 +1028,4 ko:
1028 1028 label_git_report_last_commit: Report last commit for files and directories
1029 1029 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1030 1030 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1031 notice_issue_successful_create: Issue %{id} created.
@@ -1036,3 +1036,4 lt:
1036 1036 label_git_report_last_commit: Report last commit for files and directories
1037 1037 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1038 1038 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1039 notice_issue_successful_create: Issue %{id} created.
@@ -971,3 +971,4 lv:
971 971 label_git_report_last_commit: Report last commit for files and directories
972 972 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
973 973 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
974 notice_issue_successful_create: Issue %{id} created.
@@ -976,3 +976,4 mk:
976 976 label_git_report_last_commit: Report last commit for files and directories
977 977 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
978 978 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
979 notice_issue_successful_create: Issue %{id} created.
@@ -977,3 +977,4 mn:
977 977 label_git_report_last_commit: Report last commit for files and directories
978 978 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
979 979 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
980 notice_issue_successful_create: Issue %{id} created.
@@ -958,3 +958,4 nl:
958 958 label_git_report_last_commit: Report last commit for files and directories
959 959 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
960 960 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
961 notice_issue_successful_create: Issue %{id} created.
@@ -963,3 +963,4
963 963 label_git_report_last_commit: Report last commit for files and directories
964 964 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
965 965 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
966 notice_issue_successful_create: Issue %{id} created.
@@ -993,3 +993,4 pl:
993 993 label_git_report_last_commit: Report last commit for files and directories
994 994 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
995 995 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
996 notice_issue_successful_create: Issue %{id} created.
@@ -997,3 +997,4 pt-BR:
997 997 label_git_report_last_commit: Relatar última alteração para arquivos e diretórios
998 998 text_scm_config: Você pode configurar seus comandos de versionamento em config/configurations.yml. Por favor reinicie a aplicação após alterá-lo.
999 999 text_scm_command_not_available: Comando de versionamento não disponível. Por favor verifique as configurações no painel de administração.
1000 notice_issue_successful_create: Issue %{id} created.
@@ -981,3 +981,4 pt:
981 981 label_git_report_last_commit: Report last commit for files and directories
982 982 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
983 983 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
984 notice_issue_successful_create: Issue %{id} created.
@@ -969,3 +969,4 ro:
969 969 label_git_report_last_commit: Report last commit for files and directories
970 970 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
971 971 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
972 notice_issue_successful_create: Issue %{id} created.
@@ -1089,3 +1089,4 ru:
1089 1089 label_git_report_last_commit: Report last commit for files and directories
1090 1090 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1091 1091 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1092 notice_issue_successful_create: Issue %{id} created.
@@ -971,3 +971,4 sk:
971 971 label_git_report_last_commit: Report last commit for files and directories
972 972 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
973 973 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
974 notice_issue_successful_create: Issue %{id} created.
@@ -972,3 +972,4 sl:
972 972 label_git_report_last_commit: Report last commit for files and directories
973 973 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
974 974 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
975 notice_issue_successful_create: Issue %{id} created.
@@ -976,3 +976,4 sr-YU:
976 976 label_git_report_last_commit: Report last commit for files and directories
977 977 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
978 978 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
979 notice_issue_successful_create: Issue %{id} created.
@@ -977,3 +977,4 sr:
977 977 label_git_report_last_commit: Report last commit for files and directories
978 978 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
979 979 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
980 notice_issue_successful_create: Issue %{id} created.
@@ -1017,3 +1017,4 sv:
1017 1017 enumeration_doc_categories: Dokumentkategorier
1018 1018 enumeration_activities: Aktiviteter (tidsuppföljning)
1019 1019 enumeration_system_activity: Systemaktivitet
1020 notice_issue_successful_create: Issue %{id} created.
@@ -973,3 +973,4 th:
973 973 label_git_report_last_commit: Report last commit for files and directories
974 974 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
975 975 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
976 notice_issue_successful_create: Issue %{id} created.
@@ -995,3 +995,4 tr:
995 995 label_git_report_last_commit: Report last commit for files and directories
996 996 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
997 997 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
998 notice_issue_successful_create: Issue %{id} created.
@@ -972,3 +972,4 uk:
972 972 label_git_report_last_commit: Report last commit for files and directories
973 973 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
974 974 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
975 notice_issue_successful_create: Issue %{id} created.
@@ -1027,3 +1027,4 vi:
1027 1027 label_git_report_last_commit: Report last commit for files and directories
1028 1028 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1029 1029 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1030 notice_issue_successful_create: Issue %{id} created.
@@ -1057,3 +1057,4
1057 1057 enumeration_doc_categories: 文件分類
1058 1058 enumeration_activities: 活動 (時間追蹤)
1059 1059 enumeration_system_activity: 系統活動
1060 notice_issue_successful_create: Issue %{id} created.
@@ -979,3 +979,4 zh:
979 979 label_git_report_last_commit: Report last commit for files and directories
980 980 text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
981 981 text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
982 notice_issue_successful_create: Issue %{id} created.
@@ -558,13 +558,16 class IssuesControllerTest < ActionController::TestCase
558 558
559 559 def test_post_create_and_continue
560 560 @request.session[:user_id] = 2
561 post :create, :project_id => 1,
562 :issue => {:tracker_id => 3,
563 :subject => 'This is first issue',
564 :priority_id => 5},
565 :continue => ''
566 assert_redirected_to :controller => 'issues', :action => 'new', :project_id => 'ecookbook',
567 :issue => {:tracker_id => 3}
561 assert_difference 'Issue.count' do
562 post :create, :project_id => 1,
563 :issue => {:tracker_id => 3, :subject => 'This is first issue', :priority_id => 5},
564 :continue => ''
565 end
566
567 issue = Issue.first(:order => 'id DESC')
568 assert_redirected_to :controller => 'issues', :action => 'new', :project_id => 'ecookbook', :issue => {:tracker_id => 3}
569 assert_not_nil flash[:notice], "flash was not set"
570 assert flash[:notice].include?("<a href='/issues/#{issue.id}'>##{issue.id}</a>"), "issue link not found in flash: #{flash[:notice]}"
568 571 end
569 572
570 573 def test_post_create_without_custom_fields_param
General Comments 0
You need to be logged in to leave comments. Login now