@@ -239,8 +239,8 module IssuesHelper | |||
|
239 | 239 | r.to_html |
|
240 | 240 | end |
|
241 | 241 | |
|
242 | def render_custom_fields_rows(issue) | |
|
243 | values = issue.visible_custom_field_values | |
|
242 | def render_half_width_custom_fields_rows(issue) | |
|
243 | values = issue.visible_custom_field_values.reject {|value| value.custom_field.full_width_layout?} | |
|
244 | 244 | return if values.empty? |
|
245 | 245 | half = (values.size / 2.0).ceil |
|
246 | 246 | issue_fields_rows do |rows| |
@@ -252,6 +252,26 module IssuesHelper | |||
|
252 | 252 | end |
|
253 | 253 | end |
|
254 | 254 | |
|
255 | def render_full_width_custom_fields_rows(issue) | |
|
256 | values = issue.visible_custom_field_values.select {|value| value.custom_field.full_width_layout?} | |
|
257 | return if values.empty? | |
|
258 | ||
|
259 | s = '' | |
|
260 | values.each_with_index do |value, i| | |
|
261 | if value.custom_field.text_formatting == 'full' | |
|
262 | attr_value = content_tag('div', show_value(value), class: 'wiki') | |
|
263 | else | |
|
264 | attr_value = show_value(value) | |
|
265 | end | |
|
266 | content = | |
|
267 | content_tag('hr') + | |
|
268 | content_tag('p', content_tag('strong', custom_field_name_tag(value.custom_field) )) + | |
|
269 | content_tag('div', attr_value, class: 'value') | |
|
270 | s << content_tag('div', content, class: "cf_#{value.custom_field.id} attribute") | |
|
271 | end | |
|
272 | s.html_safe | |
|
273 | end | |
|
274 | ||
|
255 | 275 | # Returns the path for updating the issue form |
|
256 | 276 | # with project as the current project |
|
257 | 277 | def update_issue_form_path(project, issue) |
@@ -89,7 +89,8 class CustomField < ActiveRecord::Base | |||
|
89 | 89 | 'edit_tag_style', |
|
90 | 90 | 'user_role', |
|
91 | 91 | 'version_status', |
|
92 | 'extensions_allowed' | |
|
92 | 'extensions_allowed', | |
|
93 | 'full_width_layout' | |
|
93 | 94 | |
|
94 | 95 | def format |
|
95 | 96 | @format ||= Redmine::FieldFormat.find(field_format) |
@@ -186,6 +187,10 class CustomField < ActiveRecord::Base | |||
|
186 | 187 | format.totalable_supported |
|
187 | 188 | end |
|
188 | 189 | |
|
190 | def full_width_layout? | |
|
191 | full_width_layout == '1' | |
|
192 | end | |
|
193 | ||
|
189 | 194 | # Returns a ORDER BY clause that can used to sort customized |
|
190 | 195 | # objects by their value of the custom field. |
|
191 | 196 | # Returns nil if the custom field can not be used for sorting. |
@@ -1,3 +1,6 | |||
|
1 | 1 | <%= render :partial => 'custom_fields/formats/regexp', :locals => {:f => f, :custom_field => custom_field} %> |
|
2 | 2 | <p><%= f.check_box :text_formatting, {:label => :setting_text_formatting}, 'full', '' %></p> |
|
3 | <% if @custom_field.class.name == "IssueCustomField" %> | |
|
4 | <p><%= f.check_box :full_width_layout %></p> | |
|
5 | <% end %> | |
|
3 | 6 | <p><%= f.text_area(:default_value, :rows => 5) %></p> |
@@ -1,4 +1,7 | |||
|
1 | 1 | <% custom_field_values = @issue.editable_custom_field_values %> |
|
2 | <% custom_field_values_full_width = custom_field_values.select { |value| value.custom_field.full_width_layout? } %> | |
|
3 | <% custom_field_values -= custom_field_values_full_width %> | |
|
4 | ||
|
2 | 5 | <% if custom_field_values.present? %> |
|
3 | 6 | <div class="splitcontent"> |
|
4 | 7 | <div class="splitcontentleft"> |
@@ -14,3 +17,7 | |||
|
14 | 17 | </div> |
|
15 | 18 | </div> |
|
16 | 19 | <% end %> |
|
20 | ||
|
21 | <% custom_field_values_full_width.each do |value| %> | |
|
22 | <p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p> | |
|
23 | <% end %> |
@@ -66,7 +66,7 | |||
|
66 | 66 | end |
|
67 | 67 | end |
|
68 | 68 | end %> |
|
69 | <%= render_custom_fields_rows(@issue) %> | |
|
69 | <%= render_half_width_custom_fields_rows(@issue) %> | |
|
70 | 70 | <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> |
|
71 | 71 | </div> |
|
72 | 72 | |
@@ -87,6 +87,8 end %> | |||
|
87 | 87 | <%= link_to_attachments @issue, :thumbnails => true %> |
|
88 | 88 | <% end -%> |
|
89 | 89 | |
|
90 | <%= render_full_width_custom_fields_rows(@issue) %> | |
|
91 | ||
|
90 | 92 | <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> |
|
91 | 93 | |
|
92 | 94 | <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %> |
@@ -372,6 +372,7 en: | |||
|
372 | 372 | field_textarea_font: Font used for text areas |
|
373 | 373 | field_updated_by: Updated by |
|
374 | 374 | field_last_updated_by: Last updated by |
|
375 | field_full_width_layout: Full width layout | |
|
375 | 376 | |
|
376 | 377 | setting_app_title: Application title |
|
377 | 378 | setting_app_subtitle: Application subtitle |
@@ -384,6 +384,7 fr: | |||
|
384 | 384 | field_textarea_font: Police utilisΓ©e pour les champs texte |
|
385 | 385 | field_updated_by: Mise Γ jour par |
|
386 | 386 | field_last_updated_by: Dernière mise à jour par |
|
387 | field_full_width_layout: Afficher sur toute la largeur | |
|
387 | 388 | |
|
388 | 389 | setting_app_title: Titre de l'application |
|
389 | 390 | setting_app_subtitle: Sous-titre de l'application |
@@ -108,7 +108,7 module Redmine | |||
|
108 | 108 | CustomField.store_accessor :format_store, *args |
|
109 | 109 | end |
|
110 | 110 | |
|
111 | field_attributes :url_pattern | |
|
111 | field_attributes :url_pattern, :full_width_layout | |
|
112 | 112 | |
|
113 | 113 | def name |
|
114 | 114 | self.class.format_name |
@@ -463,8 +463,8 div.issue div.subject h3 {margin: 0; margin-bottom: 0.1em;} | |||
|
463 | 463 | div.issue span.private, div.journal span.private { position:relative; bottom: 2px; text-transform: uppercase; background: #d22; color: #fff; font-weight:bold; padding: 0px 2px 0px 2px; font-size: 60%; margin-right: 2px; border-radius: 2px;} |
|
464 | 464 | div.issue .next-prev-links {color:#999;} |
|
465 | 465 | div.issue .attributes {margin-top: 2em;} |
|
466 | div.issue .attribute {padding-left:180px; clear:left; min-height: 1.8em;} | |
|
467 | div.issue .attribute .label {width: 170px; margin-left:-180px; font-weight:bold; float:left; overflow:hidden; text-overflow: ellipsis;} | |
|
466 | div.issue .attributes .attribute {padding-left:180px; clear:left; min-height: 1.8em;} | |
|
467 | div.issue .attributes .attribute .label {width: 170px; margin-left:-180px; font-weight:bold; float:left; overflow:hidden; text-overflow: ellipsis;} | |
|
468 | 468 | div.issue .attribute .value {overflow:hidden; text-overflow: ellipsis;} |
|
469 | 469 | div.issue.overdue .due-date .value { color: #c22; } |
|
470 | 470 |
@@ -126,6 +126,20 class CustomFieldsControllerTest < Redmine::ControllerTest | |||
|
126 | 126 | assert_select '[name=?]', 'custom_field[default_value]', 0 |
|
127 | 127 | end |
|
128 | 128 | |
|
129 | def test_setting_full_width_layout_shoul_be_present_only_for_long_text_issue_custom_field | |
|
130 | get :new, :type => 'IssueCustomField', :custom_field => {:field_format => 'text'} | |
|
131 | assert_response :success | |
|
132 | assert_select '[name=?]', 'custom_field[full_width_layout]' | |
|
133 | ||
|
134 | get :new, :type => 'IssueCustomField', :custom_field => {:field_format => 'list'} | |
|
135 | assert_response :success | |
|
136 | assert_select '[name=?]', 'custom_field[full_width_layout]', 0 | |
|
137 | ||
|
138 | get :new, :type => 'TimeEntryCustomField', :custom_field => {:field_format => 'text'} | |
|
139 | assert_response :success | |
|
140 | assert_select '[name=?]', 'custom_field[full_width_layout]', 0 | |
|
141 | end | |
|
142 | ||
|
129 | 143 | def test_new_js |
|
130 | 144 | xhr :get, :new, :type => 'IssueCustomField', :custom_field => {:field_format => 'list'}, :format => 'js' |
|
131 | 145 | assert_response :success |
@@ -561,8 +561,8 class IssuesControllerTest < Redmine::ControllerTest | |||
|
561 | 561 | str_big5 = "\xa4@\xa4\xeb".force_encoding('Big5') |
|
562 | 562 | issue = Issue.generate!(:subject => str_utf8) |
|
563 | 563 | |
|
564 |
get :index, :project_id => 1, |
|
|
565 |
:f => ['subject'], |
|
|
564 | get :index, :project_id => 1, | |
|
565 | :f => ['subject'], | |
|
566 | 566 | :op => '=', :values => [str_utf8], |
|
567 | 567 | :format => 'csv' |
|
568 | 568 | assert_equal 'text/csv; header=present', @response.content_type |
@@ -580,8 +580,8 class IssuesControllerTest < Redmine::ControllerTest | |||
|
580 | 580 | str_utf8 = "\xe4\xbb\xa5\xe5\x86\x85".force_encoding('UTF-8') |
|
581 | 581 | issue = Issue.generate!(:subject => str_utf8) |
|
582 | 582 | |
|
583 |
get :index, :project_id => 1, |
|
|
584 |
:f => ['subject'], |
|
|
583 | get :index, :project_id => 1, | |
|
584 | :f => ['subject'], | |
|
585 | 585 | :op => '=', :values => [str_utf8], |
|
586 | 586 | :c => ['status', 'subject'], |
|
587 | 587 | :format => 'csv', |
@@ -603,8 +603,8 class IssuesControllerTest < Redmine::ControllerTest | |||
|
603 | 603 | str1 = "test_index_csv_tw" |
|
604 | 604 | issue = Issue.generate!(:subject => str1, :estimated_hours => '1234.5') |
|
605 | 605 | |
|
606 |
get :index, :project_id => 1, |
|
|
607 |
:f => ['subject'], |
|
|
606 | get :index, :project_id => 1, | |
|
607 | :f => ['subject'], | |
|
608 | 608 | :op => '=', :values => [str1], |
|
609 | 609 | :c => ['estimated_hours', 'subject'], |
|
610 | 610 | :format => 'csv', |
@@ -620,8 +620,8 class IssuesControllerTest < Redmine::ControllerTest | |||
|
620 | 620 | str1 = "test_index_csv_fr" |
|
621 | 621 | issue = Issue.generate!(:subject => str1, :estimated_hours => '1234.5') |
|
622 | 622 | |
|
623 |
get :index, :project_id => 1, |
|
|
624 |
:f => ['subject'], |
|
|
623 | get :index, :project_id => 1, | |
|
624 | :f => ['subject'], | |
|
625 | 625 | :op => '=', :values => [str1], |
|
626 | 626 | :c => ['estimated_hours', 'subject'], |
|
627 | 627 | :format => 'csv', |
@@ -696,34 +696,34 class IssuesControllerTest < Redmine::ControllerTest | |||
|
696 | 696 | assert_response :success |
|
697 | 697 | end |
|
698 | 698 | end |
|
699 | ||
|
699 | ||
|
700 | 700 | def test_index_sort_by_assigned_to |
|
701 | 701 | get :index, :sort => 'assigned_to' |
|
702 | 702 | assert_response :success |
|
703 | ||
|
703 | ||
|
704 | 704 | assignees = issues_in_list.map(&:assigned_to).compact |
|
705 | 705 | assert_equal assignees.sort, assignees |
|
706 | 706 | assert_select 'table.issues.sort-by-assigned-to.sort-asc' |
|
707 | 707 | end |
|
708 | ||
|
708 | ||
|
709 | 709 | def test_index_sort_by_assigned_to_desc |
|
710 | 710 | get :index, :sort => 'assigned_to:desc' |
|
711 | 711 | assert_response :success |
|
712 | ||
|
712 | ||
|
713 | 713 | assignees = issues_in_list.map(&:assigned_to).compact |
|
714 | 714 | assert_equal assignees.sort.reverse, assignees |
|
715 | 715 | assert_select 'table.issues.sort-by-assigned-to.sort-desc' |
|
716 | 716 | end |
|
717 | ||
|
717 | ||
|
718 | 718 | def test_index_group_by_assigned_to |
|
719 | 719 | get :index, :group_by => 'assigned_to', :sort => 'priority' |
|
720 | 720 | assert_response :success |
|
721 | 721 | end |
|
722 | ||
|
722 | ||
|
723 | 723 | def test_index_sort_by_author |
|
724 | 724 | get :index, :sort => 'author', :c => ['author'] |
|
725 | 725 | assert_response :success |
|
726 | ||
|
726 | ||
|
727 | 727 | authors = issues_in_list.map(&:author) |
|
728 | 728 | assert_equal authors.sort, authors |
|
729 | 729 | end |
@@ -731,30 +731,30 class IssuesControllerTest < Redmine::ControllerTest | |||
|
731 | 731 | def test_index_sort_by_author_desc |
|
732 | 732 | get :index, :sort => 'author:desc' |
|
733 | 733 | assert_response :success |
|
734 | ||
|
734 | ||
|
735 | 735 | authors = issues_in_list.map(&:author) |
|
736 | 736 | assert_equal authors.sort.reverse, authors |
|
737 | 737 | end |
|
738 | ||
|
738 | ||
|
739 | 739 | def test_index_group_by_author |
|
740 | 740 | get :index, :group_by => 'author', :sort => 'priority' |
|
741 | 741 | assert_response :success |
|
742 | 742 | end |
|
743 | ||
|
743 | ||
|
744 | 744 | def test_index_sort_by_spent_hours |
|
745 | 745 | get :index, :sort => 'spent_hours:desc' |
|
746 | 746 | assert_response :success |
|
747 | 747 | hours = issues_in_list.map(&:spent_hours) |
|
748 | 748 | assert_equal hours.sort.reverse, hours |
|
749 | 749 | end |
|
750 | ||
|
750 | ||
|
751 | 751 | def test_index_sort_by_total_spent_hours |
|
752 | 752 | get :index, :sort => 'total_spent_hours:desc' |
|
753 | 753 | assert_response :success |
|
754 | 754 | hours = issues_in_list.map(&:total_spent_hours) |
|
755 | 755 | assert_equal hours.sort.reverse, hours |
|
756 | 756 | end |
|
757 | ||
|
757 | ||
|
758 | 758 | def test_index_sort_by_total_estimated_hours |
|
759 | 759 | get :index, :sort => 'total_estimated_hours:desc' |
|
760 | 760 | assert_response :success |
@@ -1093,7 +1093,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
1093 | 1093 | def test_index_should_not_include_new_issue_tab_for_project_without_trackers |
|
1094 | 1094 | with_settings :new_item_menu_tab => '1' do |
|
1095 | 1095 | Project.find(1).trackers.clear |
|
1096 | ||
|
1096 | ||
|
1097 | 1097 | @request.session[:user_id] = 2 |
|
1098 | 1098 | get :index, :project_id => 1 |
|
1099 | 1099 | assert_select '#main-menu a.new-issue', 0 |
@@ -1105,7 +1105,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
1105 | 1105 | role = Role.find(1) |
|
1106 | 1106 | role.remove_permission! :add_issues |
|
1107 | 1107 | role.add_permission! :copy_issues |
|
1108 | ||
|
1108 | ||
|
1109 | 1109 | @request.session[:user_id] = 2 |
|
1110 | 1110 | get :index, :project_id => 1 |
|
1111 | 1111 | assert_select '#main-menu a.new-issue', 0 |
@@ -1381,7 +1381,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
1381 | 1381 | |
|
1382 | 1382 | def test_show_should_display_prev_next_links_with_query_and_sort_on_association |
|
1383 | 1383 | @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => nil} |
|
1384 | ||
|
1384 | ||
|
1385 | 1385 | %w(project tracker status priority author assigned_to category fixed_version).each do |assoc_sort| |
|
1386 | 1386 | @request.session['issues_index_sort'] = assoc_sort |
|
1387 | 1387 | |
@@ -1575,6 +1575,25 class IssuesControllerTest < Redmine::ControllerTest | |||
|
1575 | 1575 | assert_select ".cf_1 .value", :text => 'MySQL, Oracle' |
|
1576 | 1576 | end |
|
1577 | 1577 | |
|
1578 | def test_show_with_full_width_layout_custom_field_should_show_field_under_description | |
|
1579 | field = IssueCustomField.create!(:name => 'Long text', :field_format => 'text', :full_width_layout => '1', | |
|
1580 | :tracker_ids => [1], :is_for_all => true) | |
|
1581 | issue = Issue.find(1) | |
|
1582 | issue.custom_field_values = {field.id => 'This is a long text'} | |
|
1583 | issue.save! | |
|
1584 | ||
|
1585 | get :show, :id => 1 | |
|
1586 | assert_response :success | |
|
1587 | ||
|
1588 | # long text custom field should not be render in the attributes div | |
|
1589 | assert_select "div.attributes div.attribute.cf_#{field.id} p strong", 0, :text => 'Long text' | |
|
1590 | assert_select "div.attributes div.attribute.cf_#{field.id} div.value", 0, :text => 'This is a long text' | |
|
1591 | ||
|
1592 | # long text custom field should be render under description field | |
|
1593 | assert_select "div.description ~ div.attribute.cf_#{field.id} p strong", :text => 'Long text' | |
|
1594 | assert_select "div.description ~ div.attribute.cf_#{field.id} div.value", :text => 'This is a long text' | |
|
1595 | end | |
|
1596 | ||
|
1578 | 1597 | def test_show_with_multi_user_custom_field |
|
1579 | 1598 | field = IssueCustomField.create!(:name => 'Multi user', :field_format => 'user', :multiple => true, |
|
1580 | 1599 | :tracker_ids => [1], :is_for_all => true) |
@@ -1628,7 +1647,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
1628 | 1647 | end |
|
1629 | 1648 | |
|
1630 | 1649 | def test_show_export_to_pdf |
|
1631 |
issue = Issue.find(3) |
|
|
1650 | issue = Issue.find(3) | |
|
1632 | 1651 | assert issue.relations.select{|r| r.other_issue(issue).visible?}.present? |
|
1633 | 1652 | get :show, :id => 3, :format => 'pdf' |
|
1634 | 1653 | assert_response :success |
@@ -2076,7 +2095,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
2076 | 2095 | get :new, :project_id => 'invalid' |
|
2077 | 2096 | assert_response 404 |
|
2078 | 2097 | end |
|
2079 |
|
|
|
2098 | ||
|
2080 | 2099 | def test_new_with_parent_id_should_only_propose_valid_trackers |
|
2081 | 2100 | @request.session[:user_id] = 2 |
|
2082 | 2101 | t = Tracker.find(3) |
@@ -2625,7 +2644,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
2625 | 2644 | :custom_field_values => {'2' => 'Value for field 2'}} |
|
2626 | 2645 | end |
|
2627 | 2646 | assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id |
|
2628 | ||
|
2647 | ||
|
2629 | 2648 | assert_equal 1, ActionMailer::Base.deliveries.size |
|
2630 | 2649 | end |
|
2631 | 2650 | end |
@@ -2899,7 +2918,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
2899 | 2918 | assert_select 'option[value="1"][selected=selected]', :text => 'eCookbook' |
|
2900 | 2919 | assert_select 'option[value="2"]:not([selected])', :text => 'OnlineStore' |
|
2901 | 2920 | end |
|
2902 |
assert_select 'input[name=?][value=?]', 'issue[subject]', orig.subject |
|
|
2921 | assert_select 'input[name=?][value=?]', 'issue[subject]', orig.subject | |
|
2903 | 2922 | assert_select 'input[name=copy_from][value="1"]' |
|
2904 | 2923 | end |
|
2905 | 2924 | end |
@@ -3194,7 +3213,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
3194 | 3213 | def test_get_edit_should_display_the_time_entry_form_with_log_time_permission |
|
3195 | 3214 | @request.session[:user_id] = 2 |
|
3196 | 3215 | Role.find_by_name('Manager').update_attribute :permissions, [:view_issues, :edit_issues, :log_time] |
|
3197 | ||
|
3216 | ||
|
3198 | 3217 | get :edit, :id => 1 |
|
3199 | 3218 | assert_select 'input[name=?]', 'time_entry[hours]' |
|
3200 | 3219 | end |
@@ -3202,7 +3221,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
3202 | 3221 | def test_get_edit_should_not_display_the_time_entry_form_without_log_time_permission |
|
3203 | 3222 | @request.session[:user_id] = 2 |
|
3204 | 3223 | Role.find_by_name('Manager').remove_permission! :log_time |
|
3205 | ||
|
3224 | ||
|
3206 | 3225 | get :edit, :id => 1 |
|
3207 | 3226 | assert_select 'input[name=?]', 'time_entry[hours]', 0 |
|
3208 | 3227 | end |
@@ -3847,7 +3866,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
3847 | 3866 | assert_response :redirect |
|
3848 | 3867 | assert_redirected_to :controller => 'issues', :action => 'show', :id => issue.id |
|
3849 | 3868 | end |
|
3850 |
|
|
|
3869 | ||
|
3851 | 3870 | def test_put_update_should_redirect_with_previous_and_next_issue_ids_params |
|
3852 | 3871 | @request.session[:user_id] = 2 |
|
3853 | 3872 | |
@@ -3901,17 +3920,17 class IssuesControllerTest < Redmine::ControllerTest | |||
|
3901 | 3920 | |
|
3902 | 3921 | assert_select 'select[name=?]', 'issue[project_id]' |
|
3903 | 3922 | assert_select 'input[name=?]', 'issue[parent_issue_id]' |
|
3904 | ||
|
3923 | ||
|
3905 | 3924 | # Project specific custom field, date type |
|
3906 | 3925 | field = CustomField.find(9) |
|
3907 | 3926 | assert !field.is_for_all? |
|
3908 | 3927 | assert_equal 'date', field.field_format |
|
3909 | 3928 | assert_select 'input[name=?]', 'issue[custom_field_values][9]' |
|
3910 | ||
|
3929 | ||
|
3911 | 3930 | # System wide custom field |
|
3912 | 3931 | assert CustomField.find(1).is_for_all? |
|
3913 | 3932 | assert_select 'select[name=?]', 'issue[custom_field_values][1]' |
|
3914 | ||
|
3933 | ||
|
3915 | 3934 | # Be sure we don't display inactive IssuePriorities |
|
3916 | 3935 | assert ! IssuePriority.find(15).active? |
|
3917 | 3936 | assert_select 'select[name=?]', 'issue[priority_id]' do |
@@ -4115,7 +4134,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
4115 | 4134 | :issue => {:priority_id => '', |
|
4116 | 4135 | :assigned_to_id => group.id, |
|
4117 | 4136 | :custom_field_values => {'2' => ''}} |
|
4118 | ||
|
4137 | ||
|
4119 | 4138 | assert_response 302 |
|
4120 | 4139 | assert_equal [group, group], Issue.where(:id => [1, 2]).collect {|i| i.assigned_to} |
|
4121 | 4140 | end |
@@ -4421,7 +4440,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
4421 | 4440 | assert_select 'option[value="2"]' |
|
4422 | 4441 | end |
|
4423 | 4442 | end |
|
4424 | ||
|
4443 | ||
|
4425 | 4444 | def test_bulk_copy_to_another_project |
|
4426 | 4445 | @request.session[:user_id] = 2 |
|
4427 | 4446 | assert_difference 'Issue.count', 2 do |
@@ -4474,7 +4493,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
4474 | 4493 | :assigned_to_id => 2) |
|
4475 | 4494 | ] |
|
4476 | 4495 | assert_difference 'Issue.count', issues.size do |
|
4477 |
post :bulk_update, :ids => issues.map(&:id), :copy => '1', |
|
|
4496 | post :bulk_update, :ids => issues.map(&:id), :copy => '1', | |
|
4478 | 4497 | :issue => { |
|
4479 | 4498 | :project_id => '', :tracker_id => '', :assigned_to_id => '', |
|
4480 | 4499 | :status_id => '', :start_date => '', :due_date => '' |
@@ -4506,7 +4525,7 class IssuesControllerTest < Redmine::ControllerTest | |||
|
4506 | 4525 | @request.session[:user_id] = 2 |
|
4507 | 4526 | assert_difference 'Issue.count', 2 do |
|
4508 | 4527 | assert_no_difference 'Project.find(1).issues.count' do |
|
4509 |
post :bulk_update, :ids => [1, 2], :copy => '1', |
|
|
4528 | post :bulk_update, :ids => [1, 2], :copy => '1', | |
|
4510 | 4529 | :issue => { |
|
4511 | 4530 | :project_id => '2', :tracker_id => '', :assigned_to_id => '2', |
|
4512 | 4531 | :status_id => '1', :start_date => '2009-12-01', :due_date => '2009-12-31' |
General Comments 0
You need to be logged in to leave comments.
Login now