@@ -314,7 +314,7 private | |||
|
314 | 314 | render_error l(:error_no_tracker_in_project) |
|
315 | 315 | return false |
|
316 | 316 | end |
|
317 | @issue.start_date ||= Date.today | |
|
317 | @issue.start_date ||= Date.today if Setting.default_issue_start_date_to_creation_date? | |
|
318 | 318 | if params[:issue].is_a?(Hash) |
|
319 | 319 | @issue.safe_attributes = params[:issue] |
|
320 | 320 | if User.current.allowed_to?(:add_issue_watchers, @project) && @issue.new_record? |
@@ -5,6 +5,8 | |||
|
5 | 5 | |
|
6 | 6 | <p><%= setting_check_box :issue_group_assignment %></p> |
|
7 | 7 | |
|
8 | <p><%= setting_check_box :default_issue_start_date_to_creation_date %></p> | |
|
9 | ||
|
8 | 10 | <p><%= setting_check_box :display_subprojects_issues %></p> |
|
9 | 11 | |
|
10 | 12 | <p><%= setting_select :issue_done_ratio, Issue::DONE_RATIO_OPTIONS.collect {|i| [l("setting_issue_done_ratio_#{i}"), i]} %></p> |
@@ -998,3 +998,4 bg: | |||
|
998 | 998 | description_date_range_interval: Изберете диапазон чрез задаване на начална и крайна дати |
|
999 | 999 | description_date_from: Въведете начална дата |
|
1000 | 1000 | description_date_to: Въведете крайна дата |
|
1001 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1014,3 +1014,4 bs: | |||
|
1014 | 1014 | label_parent_revision: Parent |
|
1015 | 1015 | label_child_revision: Child |
|
1016 | 1016 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1017 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1003,3 +1003,4 ca: | |||
|
1003 | 1003 | label_parent_revision: Parent |
|
1004 | 1004 | label_child_revision: Child |
|
1005 | 1005 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1006 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1004,3 +1004,4 cs: | |||
|
1004 | 1004 | label_parent_revision: Parent |
|
1005 | 1005 | label_child_revision: Child |
|
1006 | 1006 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1007 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1017,3 +1017,4 da: | |||
|
1017 | 1017 | label_parent_revision: Parent |
|
1018 | 1018 | label_child_revision: Child |
|
1019 | 1019 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1020 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1021,3 +1021,4 de: | |||
|
1021 | 1021 | label_parent_revision: Parent |
|
1022 | 1022 | label_child_revision: Child |
|
1023 | 1023 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1024 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1000,3 +1000,4 el: | |||
|
1000 | 1000 | label_parent_revision: Parent |
|
1001 | 1001 | label_child_revision: Child |
|
1002 | 1002 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1003 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -370,7 +370,9 en-GB: | |||
|
370 | 370 | setting_commit_logtime_enabled: Enable time logging |
|
371 | 371 | setting_commit_logtime_activity_id: Activity for logged time |
|
372 | 372 | setting_gantt_items_limit: Maximum number of items displayed on the gantt chart |
|
373 | ||
|
373 | setting_issue_group_assignment: Allow issue assignment to groups | |
|
374 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value | |
|
375 | ||
|
374 | 376 | permission_add_project: Create project |
|
375 | 377 | permission_add_subprojects: Create subprojects |
|
376 | 378 | permission_edit_project: Edit project |
@@ -981,7 +983,6 en-GB: | |||
|
981 | 983 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
982 | 984 | notice_issue_successful_create: Issue %{id} created. |
|
983 | 985 | label_between: between |
|
984 | setting_issue_group_assignment: Allow issue assignment to groups | |
|
985 | 986 | label_diff: diff |
|
986 | 987 | text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo) |
|
987 | 988 | description_query_sort_criteria_direction: Sort direction |
@@ -375,6 +375,7 en: | |||
|
375 | 375 | setting_commit_logtime_activity_id: Activity for logged time |
|
376 | 376 | setting_gantt_items_limit: Maximum number of items displayed on the gantt chart |
|
377 | 377 | setting_issue_group_assignment: Allow issue assignment to groups |
|
378 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value | |
|
378 | 379 | |
|
379 | 380 | permission_add_project: Create project |
|
380 | 381 | permission_add_subprojects: Create subprojects |
@@ -1037,3 +1037,4 es: | |||
|
1037 | 1037 | description_selected_columns: Selected Columns |
|
1038 | 1038 | label_parent_revision: Parent |
|
1039 | 1039 | label_child_revision: Child |
|
1040 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1004,3 +1004,4 eu: | |||
|
1004 | 1004 | label_parent_revision: Parent |
|
1005 | 1005 | label_child_revision: Child |
|
1006 | 1006 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1007 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1003,3 +1003,4 fa: | |||
|
1003 | 1003 | label_parent_revision: Parent |
|
1004 | 1004 | label_child_revision: Child |
|
1005 | 1005 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1006 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1021,3 +1021,4 fi: | |||
|
1021 | 1021 | label_parent_revision: Parent |
|
1022 | 1022 | label_child_revision: Child |
|
1023 | 1023 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1024 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -372,6 +372,7 fr: | |||
|
372 | 372 | setting_commit_logtime_activity_id: Activité pour le temps saisi |
|
373 | 373 | setting_gantt_items_limit: Nombre maximum d'éléments affichés sur le gantt |
|
374 | 374 | setting_issue_group_assignment: Permettre l'assignement des demandes aux groupes |
|
375 | setting_default_issue_start_date_to_creation_date: Donner à la date de début d'une nouvelle demande la valeur de la date du jour | |
|
375 | 376 | |
|
376 | 377 | permission_add_project: Créer un projet |
|
377 | 378 | permission_add_subprojects: Créer des sous-projets |
@@ -1012,3 +1012,4 gl: | |||
|
1012 | 1012 | label_parent_revision: Parent |
|
1013 | 1013 | label_child_revision: Child |
|
1014 | 1014 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1015 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1005,3 +1005,4 he: | |||
|
1005 | 1005 | label_parent_revision: Parent |
|
1006 | 1006 | label_child_revision: Child |
|
1007 | 1007 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1008 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1007,3 +1007,4 hr: | |||
|
1007 | 1007 | label_parent_revision: Parent |
|
1008 | 1008 | label_child_revision: Child |
|
1009 | 1009 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1010 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1019,3 +1019,4 | |||
|
1019 | 1019 | label_parent_revision: Parent |
|
1020 | 1020 | label_child_revision: Child |
|
1021 | 1021 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1022 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1008,3 +1008,4 id: | |||
|
1008 | 1008 | label_parent_revision: Parent |
|
1009 | 1009 | label_child_revision: Child |
|
1010 | 1010 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1011 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1001,3 +1001,4 it: | |||
|
1001 | 1001 | label_parent_revision: Parent |
|
1002 | 1002 | label_child_revision: Child |
|
1003 | 1003 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1004 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1030,3 +1030,4 ja: | |||
|
1030 | 1030 | description_wiki_subpages_reassign: Choose new parent page |
|
1031 | 1031 | description_selected_columns: Selected Columns |
|
1032 | 1032 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1033 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1052,3 +1052,4 ko: | |||
|
1052 | 1052 | label_parent_revision: Parent |
|
1053 | 1053 | label_child_revision: Child |
|
1054 | 1054 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1055 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1060,3 +1060,4 lt: | |||
|
1060 | 1060 | label_parent_revision: Parent |
|
1061 | 1061 | label_child_revision: Child |
|
1062 | 1062 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1063 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -995,3 +995,4 lv: | |||
|
995 | 995 | label_parent_revision: Parent |
|
996 | 996 | label_child_revision: Child |
|
997 | 997 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
998 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1000,3 +1000,4 mk: | |||
|
1000 | 1000 | label_parent_revision: Parent |
|
1001 | 1001 | label_child_revision: Child |
|
1002 | 1002 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1003 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1001,3 +1001,4 mn: | |||
|
1001 | 1001 | label_parent_revision: Parent |
|
1002 | 1002 | label_child_revision: Child |
|
1003 | 1003 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1004 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -982,3 +982,4 nl: | |||
|
982 | 982 | label_parent_revision: Parent |
|
983 | 983 | label_child_revision: Child |
|
984 | 984 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
985 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -990,3 +990,4 | |||
|
990 | 990 | label_parent_revision: Parent |
|
991 | 991 | label_child_revision: Child |
|
992 | 992 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
993 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1017,3 +1017,4 pl: | |||
|
1017 | 1017 | label_parent_revision: Parent |
|
1018 | 1018 | label_child_revision: Child |
|
1019 | 1019 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1020 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1021,3 +1021,4 pt-BR: | |||
|
1021 | 1021 | label_parent_revision: Parent |
|
1022 | 1022 | label_child_revision: Child |
|
1023 | 1023 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1024 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1005,3 +1005,4 pt: | |||
|
1005 | 1005 | label_parent_revision: Parent |
|
1006 | 1006 | label_child_revision: Child |
|
1007 | 1007 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1008 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -993,3 +993,4 ro: | |||
|
993 | 993 | label_parent_revision: Parent |
|
994 | 994 | label_child_revision: Child |
|
995 | 995 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
996 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1113,3 +1113,4 ru: | |||
|
1113 | 1113 | label_parent_revision: Parent |
|
1114 | 1114 | label_child_revision: Child |
|
1115 | 1115 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1116 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -995,3 +995,4 sk: | |||
|
995 | 995 | label_parent_revision: Parent |
|
996 | 996 | label_child_revision: Child |
|
997 | 997 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
998 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1000,3 +1000,4 sl: | |||
|
1000 | 1000 | label_parent_revision: Parent |
|
1001 | 1001 | label_child_revision: Child |
|
1002 | 1002 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1003 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1000,3 +1000,4 sr-YU: | |||
|
1000 | 1000 | label_parent_revision: Parent |
|
1001 | 1001 | label_child_revision: Child |
|
1002 | 1002 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1003 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1001,3 +1001,4 sr: | |||
|
1001 | 1001 | label_parent_revision: Parent |
|
1002 | 1002 | label_child_revision: Child |
|
1003 | 1003 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1004 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1041,3 +1041,4 sv: | |||
|
1041 | 1041 | label_parent_revision: Parent |
|
1042 | 1042 | label_child_revision: Child |
|
1043 | 1043 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1044 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -997,3 +997,4 th: | |||
|
997 | 997 | label_parent_revision: Parent |
|
998 | 998 | label_child_revision: Child |
|
999 | 999 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1000 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1019,3 +1019,4 tr: | |||
|
1019 | 1019 | label_parent_revision: Parent |
|
1020 | 1020 | label_child_revision: Child |
|
1021 | 1021 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1022 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -996,3 +996,4 uk: | |||
|
996 | 996 | label_parent_revision: Parent |
|
997 | 997 | label_child_revision: Child |
|
998 | 998 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
999 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1051,3 +1051,4 vi: | |||
|
1051 | 1051 | label_parent_revision: Parent |
|
1052 | 1052 | label_child_revision: Child |
|
1053 | 1053 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1054 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1080,3 +1080,4 | |||
|
1080 | 1080 | label_parent_revision: Parent |
|
1081 | 1081 | label_child_revision: Child |
|
1082 | 1082 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1083 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -1002,3 +1002,4 zh: | |||
|
1002 | 1002 | label_parent_revision: Parent |
|
1003 | 1003 | label_child_revision: Child |
|
1004 | 1004 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1005 | setting_default_issue_start_date_to_creation_date: Set new issue's start date with today's date value |
@@ -123,6 +123,8 cross_project_issue_relations: | |||
|
123 | 123 | default: 0 |
|
124 | 124 | issue_group_assignment: |
|
125 | 125 | default: 0 |
|
126 | default_issue_start_date_to_creation_date: | |
|
127 | default: 1 | |
|
126 | 128 | notified_events: |
|
127 | 129 | serialized: true |
|
128 | 130 | default: |
@@ -569,6 +569,30 class IssuesControllerTest < ActionController::TestCase | |||
|
569 | 569 | :parent => {:tag => 'select', :attributes => {:id => 'issue_priority_id'} } |
|
570 | 570 | end |
|
571 | 571 | |
|
572 | def test_get_new_without_default_start_date_is_creation_date | |
|
573 | Setting.default_issue_start_date_to_creation_date = 0 | |
|
574 | ||
|
575 | @request.session[:user_id] = 2 | |
|
576 | get :new, :project_id => 1, :tracker_id => 1 | |
|
577 | assert_response :success | |
|
578 | assert_template 'new' | |
|
579 | ||
|
580 | assert_tag :tag => 'input', :attributes => { :name => 'issue[start_date]', | |
|
581 | :value => nil } | |
|
582 | end | |
|
583 | ||
|
584 | def test_get_new_with_default_start_date_is_creation_date | |
|
585 | Setting.default_issue_start_date_to_creation_date = 1 | |
|
586 | ||
|
587 | @request.session[:user_id] = 2 | |
|
588 | get :new, :project_id => 1, :tracker_id => 1 | |
|
589 | assert_response :success | |
|
590 | assert_template 'new' | |
|
591 | ||
|
592 | assert_tag :tag => 'input', :attributes => { :name => 'issue[start_date]', | |
|
593 | :value => Date.today.to_s } | |
|
594 | end | |
|
595 | ||
|
572 | 596 | def test_get_new_form_should_allow_attachment_upload |
|
573 | 597 | @request.session[:user_id] = 2 |
|
574 | 598 | get :new, :project_id => 1, :tracker_id => 1 |
@@ -676,7 +700,9 class IssuesControllerTest < ActionController::TestCase | |||
|
676 | 700 | assert_equal group, issue.assigned_to |
|
677 | 701 | end |
|
678 | 702 | |
|
679 | def test_post_create_without_start_date | |
|
703 | def test_post_create_without_start_date_and_default_start_date_is_not_creation_date | |
|
704 | Setting.default_issue_start_date_to_creation_date = 0 | |
|
705 | ||
|
680 | 706 | @request.session[:user_id] = 2 |
|
681 | 707 | assert_difference 'Issue.count' do |
|
682 | 708 | post :create, :project_id => 1, |
@@ -685,7 +711,6 class IssuesControllerTest < ActionController::TestCase | |||
|
685 | 711 | :subject => 'This is the test_new issue', |
|
686 | 712 | :description => 'This is the description', |
|
687 | 713 | :priority_id => 5, |
|
688 | :start_date => '', | |
|
689 | 714 | :estimated_hours => '', |
|
690 | 715 | :custom_field_values => {'2' => 'Value for field 2'}} |
|
691 | 716 | end |
@@ -696,6 +721,27 class IssuesControllerTest < ActionController::TestCase | |||
|
696 | 721 | assert_nil issue.start_date |
|
697 | 722 | end |
|
698 | 723 | |
|
724 | def test_post_create_without_start_date_and_default_start_date_is_creation_date | |
|
725 | Setting.default_issue_start_date_to_creation_date = 1 | |
|
726 | ||
|
727 | @request.session[:user_id] = 2 | |
|
728 | assert_difference 'Issue.count' do | |
|
729 | post :create, :project_id => 1, | |
|
730 | :issue => {:tracker_id => 3, | |
|
731 | :status_id => 2, | |
|
732 | :subject => 'This is the test_new issue', | |
|
733 | :description => 'This is the description', | |
|
734 | :priority_id => 5, | |
|
735 | :estimated_hours => '', | |
|
736 | :custom_field_values => {'2' => 'Value for field 2'}} | |
|
737 | end | |
|
738 | assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id | |
|
739 | ||
|
740 | issue = Issue.find_by_subject('This is the test_new issue') | |
|
741 | assert_not_nil issue | |
|
742 | assert_equal Date.today, issue.start_date | |
|
743 | end | |
|
744 | ||
|
699 | 745 | def test_post_create_and_continue |
|
700 | 746 | @request.session[:user_id] = 2 |
|
701 | 747 | assert_difference 'Issue.count' do |
General Comments 0
You need to be logged in to leave comments.
Login now