Your message dated Mon, 13 Feb 2017 16:49:47 +0000 with message-id <[email protected]> and subject line Bug#852694: fixed in redmine 3.3.1-3 has caused the Debian Bug report #852694, regarding redmine: Bulk edit form not show fields based on target tracker and status to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 852694: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852694 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Source: redmine Version: 3.3.1.-2 Severity: important Tags: patch Dear Maintainer, we found a bug in the upcomming Redmine version in Debian/testing: Changing the status of an issue (or several issues) using bulk edit (right click in "Issues" view) leads to a unresovable situation if the new status defines required fields which where read-only in the former status. Steps to reproduce the problem: * create a tracker defining a workflow with read-only fields which become required fields while a status change * create an issue or several tickets for this tracker * set all created tickets on the status which renders some fields as read- only * perform a query ("Issues") which shows the issues as result list * right-click on a ticket or several tickets and change status using the pop-up menu The result is a view of the ticket with the message "following fields must be filled out...", naming the required fields for the new status. However, the required fields are not visible. The issue cannot be changed. Made changes cannot be saved and are lost. The same problem occurs when using the "Edit..." option to perform a bulk edit operation (right click, pop-up menu->Edit) We would expect to be able to perform the status change and edit the required fields to save the changes in the issue. The bug is known to the Redmine team and documented here: http://www.redmine.org/issues/23755 Version Redmine version 3.4 will fix this problem. Basing on the commit which is refered to in the bugreport, I created a patch for Redmine 3.3. Please consider applying it to the upcomming redmine packages. Regading my system information: I tested the bugfix in a lxc container using the current Debian/testing (Stretch). -- System Information: Debian Release: 8.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) *** /media/transfer/klose/bulk-update.patch diff -ruN app.old/controllers/issues_controller.rb app/controllers/issues_controller.rb --- app.old/controllers/issues_controller.rb 2016-10-10 07:48:13.000000000 +0000 +++ app/controllers/issues_controller.rb 2017-01-25 12:48:48.682492410 +0000 @@ -217,24 +217,41 @@ end end + edited_issues = Issue.where(:id => @issues.map(&:id)).to_a + @allowed_projects = Issue.allowed_target_projects if params[:issue] @target_project = @allowed_projects.detect {|p| p.id.to_s == params[:issue][:project_id].to_s} if @target_project target_projects = [@target_project] + edited_issues.each {|issue| issue.project = @target_project} end end target_projects ||= @projects + @trackers = target_projects.map {|p| Issue.allowed_target_trackers(p) }.reduce(:&) + if params[:issue] + @target_tracker = @trackers.detect {|t| t.id.to_s == params[:issue][:tracker_id].to_s} + if @target_tracker + edited_issues.each {|issue| issue.tracker = @target_tracker} + end + end + if @copy # Copied issues will get their default statuses @available_statuses = [] else - @available_statuses = @issues.map(&:new_statuses_allowed_to).reduce(:&) + @available_statuses = edited_issues.map(&:new_statuses_allowed_to).reduce(:&) end - @custom_fields = @issues.map{|i|i.editable_custom_fields}.reduce(:&) + if params[:issue] + @target_status = @available_statuses.detect {|t| t.id.to_s == params[:issue][:status_id].to_s} + if @target_status + edited_issues.each {|issue| issue.status = @target_status} + end + end + + @custom_fields = edited_issues.map{|i|i.editable_custom_fields}.reduce(:&) @assignables = target_projects.map(&:assignable_users).reduce(:&) - @trackers = target_projects.map {|p| Issue.allowed_target_trackers(p) }.reduce(:&) @versions = target_projects.map {|p| p.shared_versions.open}.reduce(:&) @categories = target_projects.map {|p| p.issue_categories}.reduce(:&) if @copy @@ -242,7 +259,7 @@ @subtasks_present = @issues.detect {|i| !i.leaf?}.present? end - @safe_attributes = @issues.map(&:safe_attribute_names).reduce(:&) + @safe_attributes = edited_issues.map(&:safe_attribute_names).reduce(:&) @issue_params = params[:issue] || {} @issue_params[:custom_field_values] ||= {} diff -ruN app.old/views/issues/bulk_edit.html.erb app/views/issues/bulk_edit.html.erb --- app.old/views/issues/bulk_edit.html.erb 2016-10-10 07:48:13.000000000 +0000 +++ app/views/issues/bulk_edit.html.erb 2017-01-25 12:48:46.734436014 +0000 @@ -43,14 +43,16 @@ <label for="issue_tracker_id"><%= l(:field_tracker) %></label> <%= select_tag('issue[tracker_id]', content_tag('option', l(:label_no_change_option), :value => '') + - options_from_collection_for_select(@trackers, :id, :name, @issue_params[:tracker_id])) %> + options_from_collection_for_select(@trackers, :id, :name, @issue_params[:tracker_id]), + :onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %> </p> <% if @available_statuses.any? %> <p> <label for='issue_status_id'><%= l(:field_status) %></label> <%= select_tag('issue[status_id]', content_tag('option', l(:label_no_change_option), :value => '') + - options_from_collection_for_select(@available_statuses, :id, :name, @issue_params[:status_id])) %> + options_from_collection_for_select(@available_statuses, :id, :name, @issue_params[:status_id]), + :onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %> </p>diff -ruN app.old/controllers/issues_controller.rb app/controllers/issues_controller.rb --- app.old/controllers/issues_controller.rb 2016-10-10 07:48:13.000000000 +0000 +++ app/controllers/issues_controller.rb 2017-01-25 12:48:48.682492410 +0000 @@ -217,24 +217,41 @@ end end + edited_issues = Issue.where(:id => @issues.map(&:id)).to_a + @allowed_projects = Issue.allowed_target_projects if params[:issue] @target_project = @allowed_projects.detect {|p| p.id.to_s == params[:issue][:project_id].to_s} if @target_project target_projects = [@target_project] + edited_issues.each {|issue| issue.project = @target_project} end end target_projects ||= @projects + @trackers = target_projects.map {|p| Issue.allowed_target_trackers(p) }.reduce(:&) + if params[:issue] + @target_tracker = @trackers.detect {|t| t.id.to_s == params[:issue][:tracker_id].to_s} + if @target_tracker + edited_issues.each {|issue| issue.tracker = @target_tracker} + end + end + if @copy # Copied issues will get their default statuses @available_statuses = [] else - @available_statuses = @issues.map(&:new_statuses_allowed_to).reduce(:&) + @available_statuses = edited_issues.map(&:new_statuses_allowed_to).reduce(:&) end - @custom_fields = @issues.map{|i|i.editable_custom_fields}.reduce(:&) + if params[:issue] + @target_status = @available_statuses.detect {|t| t.id.to_s == params[:issue][:status_id].to_s} + if @target_status + edited_issues.each {|issue| issue.status = @target_status} + end + end + + @custom_fields = edited_issues.map{|i|i.editable_custom_fields}.reduce(:&) @assignables = target_projects.map(&:assignable_users).reduce(:&) - @trackers = target_projects.map {|p| Issue.allowed_target_trackers(p) }.reduce(:&) @versions = target_projects.map {|p| p.shared_versions.open}.reduce(:&) @categories = target_projects.map {|p| p.issue_categories}.reduce(:&) if @copy @@ -242,7 +259,7 @@ @subtasks_present = @issues.detect {|i| !i.leaf?}.present? end - @safe_attributes = @issues.map(&:safe_attribute_names).reduce(:&) + @safe_attributes = edited_issues.map(&:safe_attribute_names).reduce(:&) @issue_params = params[:issue] || {} @issue_params[:custom_field_values] ||= {} diff -ruN app.old/views/issues/bulk_edit.html.erb app/views/issues/bulk_edit.html.erb --- app.old/views/issues/bulk_edit.html.erb 2016-10-10 07:48:13.000000000 +0000 +++ app/views/issues/bulk_edit.html.erb 2017-01-25 12:48:46.734436014 +0000 @@ -43,14 +43,16 @@ <label for="issue_tracker_id"><%= l(:field_tracker) %></label> <%= select_tag('issue[tracker_id]', content_tag('option', l(:label_no_change_option), :value => '') + - options_from_collection_for_select(@trackers, :id, :name, @issue_params[:tracker_id])) %> + options_from_collection_for_select(@trackers, :id, :name, @issue_params[:tracker_id]), + :onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %> </p> <% if @available_statuses.any? %> <p> <label for='issue_status_id'><%= l(:field_status) %></label> <%= select_tag('issue[status_id]', content_tag('option', l(:label_no_change_option), :value => '') + - options_from_collection_for_select(@available_statuses, :id, :name, @issue_params[:status_id])) %> + options_from_collection_for_select(@available_statuses, :id, :name, @issue_params[:status_id]), + :onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %> </p> <% end %>
--- End Message ---
--- Begin Message ---Source: redmine Source-Version: 3.3.1-3 We believe that the bug you reported is fixed in the latest version of redmine, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Antonio Terceiro <[email protected]> (supplier of updated redmine package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Format: 1.8 Date: Mon, 13 Feb 2017 14:19:50 -0200 Source: redmine Binary: redmine redmine-mysql redmine-pgsql redmine-sqlite Architecture: source Version: 3.3.1-3 Distribution: unstable Urgency: medium Maintainer: Antonio Terceiro <[email protected]> Changed-By: Antonio Terceiro <[email protected]> Description: redmine - flexible project management web application redmine-mysql - metapackage providing MySQL dependencies for Redmine redmine-pgsql - metapackage providing PostgreSQL dependencies for Redmine redmine-sqlite - metapackage providing sqlite dependencies for Redmine Closes: 846978 852130 852694 Changes: redmine (3.3.1-3) unstable; urgency=medium . [ Beatrice Torracca ] * Italian translation update (Closes: #846978) . [ Antonio Terceiro ] * debian/postrm: restore purging of configuration files created by dbconfig-common (Closes: #852130) - add a autopkgtest for install/purge/install . [ Thomas Klose ] * Backport upstream patch to fix Bulk Edit functionality when changing between statuses that have different sets of read-only/mandatory fields. (Closes: #852694) Checksums-Sha1: 1f2c25d7e40594889c3b371ba2c51ed018ed14d1 2781 redmine_3.3.1-3.dsc 65d43021b683116a4b2013a7399111406f68d6d8 238648 redmine_3.3.1-3.debian.tar.xz 56765778d77b06ad906f390747e8c343a8c1ce4d 7565 redmine_3.3.1-3_source.buildinfo Checksums-Sha256: 78ee133d57592d745583b292ee050e4f94be20f1d9bcc726b9ad92370ed22ac9 2781 redmine_3.3.1-3.dsc 04e24f998d5be0bf1512a491bc064d857fd29ae85c03190a8caa3aa31f151fbd 238648 redmine_3.3.1-3.debian.tar.xz eabd7a174ffee0ca23ade47577643d08e75e6aa9f85f67df6eefe005fd60a9b7 7565 redmine_3.3.1-3_source.buildinfo Files: 751d4877ca037942c8e2cd8c705c315f 2781 web extra redmine_3.3.1-3.dsc 1ba27fb60963fdaecd437b8ac77c392d 238648 web extra redmine_3.3.1-3.debian.tar.xz 1ab9c4c06300fde04ea035b602f91010 7565 web extra redmine_3.3.1-3_source.buildinfo -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAlih4NwACgkQ/A2xu81G C956dw/+Pm8gakBW8gqhyFBfzUMWzHjl2hJgT1Wg1tzNKge/SLk1AhJrjHS7TNxx OdC19G5Y7aFmYdg1hl8n76mcc/7QM5TVIHSCejNMWeq0Uwe1qLsle+U3qc0jD0Fl zr/ngCodLqJk/eaX2sDgZAw07CK269yTaXv5kTBpp6xtoifrpFpkzG9RcC2kNL/i QBUB8Tcjr7UVtLQeV6g6Ob2Hqyw+Gt8OQVp8OtcYH+8HquJyLLV6QcVPbfiD8eqO PbJUoaQNFAWJ69h8amR3IaED/3KZrdLmNI6hkMupTOHcSsDmL8l7MMv0+twsn5eQ 5wUpX19p+5WeqRUD97o1DcK/WYArcLXy5gmW/233MLVc6T7L5qugqJ9tDJzuQRga GwOH5vq/e9HJLVQ3U3hNz7nM8durJqf+w4JcKfh9TKVPBT+KZtcMRYFcbg4pXZOt fmHJ5NSVJLrScsJe3iDdHUtM3z7i3kMVpRvLwHLIQ4lHdkyqmAmVwXwIWcAza68Z QYjnoKTQ8uABkaC81l7CfttJX4+eI4fzmPbu4E7Wv6KWg5sB397LUsKI1eigfFfI haAOV5w6bWVkYC/2olfb87VqRpMF4Vl2RaHvTi0n6adsDhsOvl7QLkTZQyzO8eXe Ahogd4iMYbsWNT6a000LysWMCHbCvnwFmjZFxrv116T6Esss76w= =aoDY -----END PGP SIGNATURE-----
--- End Message ---

