Project

General

Profile

Actions

Defect #19553

closed

When create by copying the issue, status can not be changed to default

Added by Hirokazu Onozato over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

If create a issue in the following procedure, the status is not correctly registered.

  • Copy an issue. (At this point, the status is "Assigned")
  • Change to other status. (Change to "New")
  • Pressed to the Create button. Issue is created.
  • Created issue status is registered in the pre-changed status. (Registered status is "Assigned")

Related issues

Has duplicate Redmine - Defect #19565: problem with the ticket situation copied, the situation this resettingClosed

Actions
Actions #1

Updated by Go MAEDA over 9 years ago

  • Category set to Issues

I have confirmed the behavior.
It seems to be caused by source:trunk/app/controllers/issues_controller.rb@13535#L430, introduced in r13535.

Actions #2

Updated by Go MAEDA over 9 years ago

Workaround for this issue:

Index: app/controllers/issues_controller.rb
===================================================================
--- app/controllers/issues_controller.rb    (revision 14155)
+++ app/controllers/issues_controller.rb    (working copy)
@@ -425,7 +425,7 @@
     @issue.start_date ||= Date.today if Setting.default_issue_start_date_to_creation_date?

     if attrs = params[:issue].deep_dup
-      if params[:was_default_status] == attrs[:status_id]
+      if action_name == 'new' && params[:was_default_status] == attrs[:status_id]
         attrs.delete(:status_id)
       end
       @issue.safe_attributes = attrs
Actions #3

Updated by Go MAEDA over 9 years ago

  • Target version set to 3.0.2
Actions #4

Updated by Go MAEDA over 9 years ago

  • Has duplicate Defect #19565: problem with the ticket situation copied, the situation this resetting added
Actions #5

Updated by Jean-Philippe Lang over 9 years ago

  • Subject changed from When create by copying the issue, status can not be changed. to When create by copying the issue, status can not be changed to default
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fix committed in r14158 with a test.

Actions #6

Updated by Jean-Philippe Lang over 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF