@@ -148,7 +148,8 class IssuesController < ApplicationController | |||||
148 | flash[:notice] = l(:notice_successful_create) |
|
148 | flash[:notice] = l(:notice_successful_create) | |
149 | Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added') |
|
149 | Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added') | |
150 | call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue}) |
|
150 | call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue}) | |
151 |
redirect_to |
|
151 | redirect_to(params[:continue] ? { :action => 'new', :tracker_id => @issue.tracker } : | |
|
152 | { :action => 'show', :id => @issue }) | |||
152 | return |
|
153 | return | |
153 | end |
|
154 | end | |
154 | end |
|
155 | end |
@@ -7,6 +7,7 | |||||
7 | <%= render :partial => 'issues/form', :locals => {:f => f} %> |
|
7 | <%= render :partial => 'issues/form', :locals => {:f => f} %> | |
8 | </div> |
|
8 | </div> | |
9 | <%= submit_tag l(:button_create) %> |
|
9 | <%= submit_tag l(:button_create) %> | |
|
10 | <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> | |||
10 | <%= link_to_remote l(:label_preview), |
|
11 | <%= link_to_remote l(:label_preview), | |
11 | { :url => { :controller => 'issues', :action => 'preview', :project_id => @project }, |
|
12 | { :url => { :controller => 'issues', :action => 'preview', :project_id => @project }, | |
12 | :method => 'post', |
|
13 | :method => 'post', |
@@ -698,3 +698,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
698 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
698 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
699 | text_plugin_assets_writable: Plugin assets directory writable |
|
699 | text_plugin_assets_writable: Plugin assets directory writable | |
700 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
700 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
701 | button_create_and_continue: Create and continue |
@@ -699,3 +699,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
700 | text_plugin_assets_writable: Plugin assets directory writable |
|
700 | text_plugin_assets_writable: Plugin assets directory writable | |
701 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
701 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
702 | button_create_and_continue: Create and continue |
@@ -703,3 +703,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
703 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
703 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
704 | text_plugin_assets_writable: Plugin assets directory writable |
|
704 | text_plugin_assets_writable: Plugin assets directory writable | |
705 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
705 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
706 | button_create_and_continue: Create and continue |
@@ -699,3 +699,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
700 | text_plugin_assets_writable: Plugin assets directory writable |
|
700 | text_plugin_assets_writable: Plugin assets directory writable | |
701 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
701 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
702 | button_create_and_continue: Create and continue |
@@ -700,3 +700,4 enumeration_doc_categories: Dokumentenkategorien | |||||
700 | enumeration_activities: Aktivitäten (Zeiterfassung) |
|
700 | enumeration_activities: Aktivitäten (Zeiterfassung) | |
701 | text_plugin_assets_writable: Plugin assets directory writable |
|
701 | text_plugin_assets_writable: Plugin assets directory writable | |
702 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
702 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
703 | button_create_and_continue: Create and continue |
@@ -592,6 +592,7 button_check_all: Check all | |||||
592 | button_uncheck_all: Uncheck all |
|
592 | button_uncheck_all: Uncheck all | |
593 | button_delete: Delete |
|
593 | button_delete: Delete | |
594 | button_create: Create |
|
594 | button_create: Create | |
|
595 | button_create_and_continue: Create and continue | |||
595 | button_test: Test |
|
596 | button_test: Test | |
596 | button_edit: Edit |
|
597 | button_edit: Edit | |
597 | button_add: Add |
|
598 | button_add: Add |
@@ -683,3 +683,4 text_wiki_destroy_confirmation: ¿Seguro que quiere borrar el wiki y todo su con | |||||
683 | text_workflow_edit: Seleccionar un flujo de trabajo para actualizar |
|
683 | text_workflow_edit: Seleccionar un flujo de trabajo para actualizar | |
684 | text_plugin_assets_writable: Plugin assets directory writable |
|
684 | text_plugin_assets_writable: Plugin assets directory writable | |
685 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
685 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
686 | button_create_and_continue: Create and continue |
@@ -698,3 +698,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
698 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
698 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
699 | text_plugin_assets_writable: Plugin assets directory writable |
|
699 | text_plugin_assets_writable: Plugin assets directory writable | |
700 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
700 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
701 | button_create_and_continue: Create and continue |
@@ -592,6 +592,7 button_check_all: Tout cocher | |||||
592 | button_uncheck_all: Tout décocher |
|
592 | button_uncheck_all: Tout décocher | |
593 | button_delete: Supprimer |
|
593 | button_delete: Supprimer | |
594 | button_create: Créer |
|
594 | button_create: Créer | |
|
595 | button_create_and_continue: Créer et continuer | |||
595 | button_test: Tester |
|
596 | button_test: Tester | |
596 | button_edit: Modifier |
|
597 | button_edit: Modifier | |
597 | button_add: Ajouter |
|
598 | button_add: Ajouter |
@@ -698,3 +698,4 setting_diff_max_lines_displayed: Max number of diff lines displayed | |||||
698 | text_plugin_assets_writable: Plugin assets directory writable |
|
698 | text_plugin_assets_writable: Plugin assets directory writable | |
699 | text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' |
|
699 | text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' | |
700 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
700 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
701 | button_create_and_continue: Create and continue |
@@ -699,3 +699,4 text_diff_truncated: '... A diff fájl vége nem jelenik meg, mert hosszab, mint | |||||
699 | setting_diff_max_lines_displayed: A megjelenítendő sorok száma (maximum) a diff fájloknál |
|
699 | setting_diff_max_lines_displayed: A megjelenítendő sorok száma (maximum) a diff fájloknál | |
700 | text_plugin_assets_writable: Plugin assets directory writable |
|
700 | text_plugin_assets_writable: Plugin assets directory writable | |
701 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
701 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
702 | button_create_and_continue: Create and continue |
@@ -698,3 +698,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
698 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
698 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
699 | text_plugin_assets_writable: Plugin assets directory writable |
|
699 | text_plugin_assets_writable: Plugin assets directory writable | |
700 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
700 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
701 | button_create_and_continue: Create and continue |
@@ -699,3 +699,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
700 | text_plugin_assets_writable: Plugin assets directory writable |
|
700 | text_plugin_assets_writable: Plugin assets directory writable | |
701 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
701 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
702 | button_create_and_continue: Create and continue |
@@ -698,3 +698,4 text_diff_truncated: '... 이 차이점은 표시할 수 있는 최대 줄수를 | |||||
698 | setting_diff_max_lines_displayed: 차이점보기에 표시할 최대 줄수 |
|
698 | setting_diff_max_lines_displayed: 차이점보기에 표시할 최대 줄수 | |
699 | text_plugin_assets_writable: Plugin assets directory writable |
|
699 | text_plugin_assets_writable: Plugin assets directory writable | |
700 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
700 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
701 | button_create_and_continue: Create and continue |
@@ -700,3 +700,4 enumeration_doc_categories: Dokumento kategorijos | |||||
700 | enumeration_activities: Veiklos (laiko sekimas) |
|
700 | enumeration_activities: Veiklos (laiko sekimas) | |
701 | text_plugin_assets_writable: Plugin assets directory writable |
|
701 | text_plugin_assets_writable: Plugin assets directory writable | |
702 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
702 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
703 | button_create_and_continue: Create and continue |
@@ -700,3 +700,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
700 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
700 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
701 | text_plugin_assets_writable: Plugin assets directory writable |
|
701 | text_plugin_assets_writable: Plugin assets directory writable | |
702 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
702 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
703 | button_create_and_continue: Create and continue |
@@ -699,3 +699,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
700 | text_plugin_assets_writable: Plugin assets directory writable |
|
700 | text_plugin_assets_writable: Plugin assets directory writable | |
701 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
701 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
702 | button_create_and_continue: Create and continue |
@@ -717,3 +717,4 text_diff_truncated: '... Ten plik różnic został przycięty ponieważ jest zb | |||||
717 | setting_diff_max_lines_displayed: Maksymalna liczba linii różnicy do pokazania |
|
717 | setting_diff_max_lines_displayed: Maksymalna liczba linii różnicy do pokazania | |
718 | text_plugin_assets_writable: Plugin assets directory writable |
|
718 | text_plugin_assets_writable: Plugin assets directory writable | |
719 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
719 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
720 | button_create_and_continue: Create and continue |
@@ -699,3 +699,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
700 | text_plugin_assets_writable: Plugin assets directory writable |
|
700 | text_plugin_assets_writable: Plugin assets directory writable | |
701 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
701 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
702 | button_create_and_continue: Create and continue |
@@ -700,3 +700,4 text_diff_truncated: '... Este diff foi truncado porque excede o tamanho máximo | |||||
700 | setting_diff_max_lines_displayed: Número máximo de linhas de diff mostradas |
|
700 | setting_diff_max_lines_displayed: Número máximo de linhas de diff mostradas | |
701 | text_plugin_assets_writable: Plugin assets directory writable |
|
701 | text_plugin_assets_writable: Plugin assets directory writable | |
702 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
702 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
703 | button_create_and_continue: Create and continue |
@@ -698,3 +698,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
698 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
698 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
699 | text_plugin_assets_writable: Plugin assets directory writable |
|
699 | text_plugin_assets_writable: Plugin assets directory writable | |
700 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
700 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
701 | button_create_and_continue: Create and continue |
@@ -732,3 +732,4 text_workflow_edit: Выберите роль и трекер для редак | |||||
732 |
|
732 | |||
733 | text_plugin_assets_writable: Plugin assets directory writable |
|
733 | text_plugin_assets_writable: Plugin assets directory writable | |
734 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
734 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
735 | button_create_and_continue: Create and continue |
@@ -704,3 +704,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
704 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
704 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
705 | text_plugin_assets_writable: Plugin assets directory writable |
|
705 | text_plugin_assets_writable: Plugin assets directory writable | |
706 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
706 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
707 | button_create_and_continue: Create and continue |
@@ -699,3 +699,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
700 | text_plugin_assets_writable: Plugin assets directory writable |
|
700 | text_plugin_assets_writable: Plugin assets directory writable | |
701 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
701 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
702 | button_create_and_continue: Create and continue |
@@ -699,3 +699,4 enumeration_doc_categories: Dokumentkategorier | |||||
699 | enumeration_activities: Aktiviteter (tidsuppföljning) |
|
699 | enumeration_activities: Aktiviteter (tidsuppföljning) | |
700 | text_plugin_assets_writable: Plugin assets directory writable |
|
700 | text_plugin_assets_writable: Plugin assets directory writable | |
701 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
701 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
702 | button_create_and_continue: Create and continue |
@@ -701,3 +701,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
701 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
701 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
702 | text_plugin_assets_writable: Plugin assets directory writable |
|
702 | text_plugin_assets_writable: Plugin assets directory writable | |
703 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
703 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
704 | button_create_and_continue: Create and continue |
@@ -699,3 +699,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
699 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
700 | text_plugin_assets_writable: Plugin assets directory writable |
|
700 | text_plugin_assets_writable: Plugin assets directory writable | |
701 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
701 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
702 | button_create_and_continue: Create and continue |
@@ -700,3 +700,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
700 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
700 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
701 | text_plugin_assets_writable: Plugin assets directory writable |
|
701 | text_plugin_assets_writable: Plugin assets directory writable | |
702 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
702 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
703 | button_create_and_continue: Create and continue |
@@ -701,3 +701,4 text_diff_truncated: '... This diff was truncated because it exceeds the maximum | |||||
701 | setting_diff_max_lines_displayed: Max number of diff lines displayed |
|
701 | setting_diff_max_lines_displayed: Max number of diff lines displayed | |
702 | text_plugin_assets_writable: Plugin assets directory writable |
|
702 | text_plugin_assets_writable: Plugin assets directory writable | |
703 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
703 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
704 | button_create_and_continue: Create and continue |
@@ -700,3 +700,4 enumeration_doc_categories: 文件分類 | |||||
700 | enumeration_activities: 活動 (時間追蹤) |
|
700 | enumeration_activities: 活動 (時間追蹤) | |
701 | text_plugin_assets_writable: Plugin assets directory writable |
|
701 | text_plugin_assets_writable: Plugin assets directory writable | |
702 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
702 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
703 | button_create_and_continue: Create and continue |
@@ -700,3 +700,4 enumeration_doc_categories: 文档类别 | |||||
700 | enumeration_activities: 活动(时间跟踪) |
|
700 | enumeration_activities: 活动(时间跟踪) | |
701 | text_plugin_assets_writable: Plugin assets directory writable |
|
701 | text_plugin_assets_writable: Plugin assets directory writable | |
702 | warning_attachments_not_saved: "%d file(s) could not be saved." |
|
702 | warning_attachments_not_saved: "%d file(s) could not be saved." | |
|
703 | button_create_and_continue: Create and continue |
@@ -313,6 +313,16 class IssuesControllerTest < Test::Unit::TestCase | |||||
313 | assert_equal 'Value for field 2', v.value |
|
313 | assert_equal 'Value for field 2', v.value | |
314 | end |
|
314 | end | |
315 |
|
315 | |||
|
316 | def test_post_new_and_continue | |||
|
317 | @request.session[:user_id] = 2 | |||
|
318 | post :new, :project_id => 1, | |||
|
319 | :issue => {:tracker_id => 3, | |||
|
320 | :subject => 'This is first issue', | |||
|
321 | :priority_id => 5}, | |||
|
322 | :continue => '' | |||
|
323 | assert_redirected_to :controller => 'issues', :action => 'new', :tracker_id => 3 | |||
|
324 | end | |||
|
325 | ||||
316 | def test_post_new_without_custom_fields_param |
|
326 | def test_post_new_without_custom_fields_param | |
317 | @request.session[:user_id] = 2 |
|
327 | @request.session[:user_id] = 2 | |
318 | post :new, :project_id => 1, |
|
328 | post :new, :project_id => 1, |
General Comments 0
You need to be logged in to leave comments.
Login now