Defect #21485

Roll back copied issue status when tracker change

Added by yoshinobu yoshida almost 7 years ago. Updated over 6 years ago.

Status:Needs feedbackStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution: Affected version:

Description

When coping an issue
1. Click "Copy"
2. Change status "status A" -> "status B"
3. Change tracker "tracker A" -> "tracker B"
4. Status is automatically roll back to "status A"

I do not know if it is a bug or not.

Environment:
  Redmine version                3.2.0.stable
  Ruby version                   2.2.3-p173 (2015-08-18) [x86_64-linux-gnu]
  Rails version                  4.2.5
  Environment                    production
  Database adapter               Mysql2

History

#1 Updated by Toshi MARUYAMA almost 7 years ago

  • Subject changed from Roll back status when issue copied. to Roll back copied issue status when tracker change

#2 Updated by yoshinobu yoshida almost 7 years ago

excuse me, answer please...

#3 Updated by Go MAEDA almost 7 years ago

I cannot reproduce.
Could you reproduce on https://my.redmine.jp/demo/ ?

#4 Updated by yoshinobu yoshida almost 7 years ago

It reproduced at the following link.
After changing the status to "New", status when you change the tracker to "Feature" or "Support"
will be back from the "New" to "In Progress".

https://my.redmine.jp/demo/projects/demo/issues/13360/copy

In Japanese:
下記リンクにて再現できました。
ステータスを「新規」に変更後、トラッカーを「機能」や「サポート」に変更した際に
ステータスが「新規」から「進行中」に戻ってしまいます。

#5 Updated by yoshinobu yoshida almost 7 years ago

excuse me...

#6 Updated by yoshinobu yoshida almost 7 years ago

answer please...

#7 Updated by Toshi MARUYAMA over 6 years ago

I cannot reproduce on vanilla Redmine 3.2.

#8 Updated by Go MAEDA over 6 years ago

Toshi MARUYAMA wrote:

I cannot reproduce on vanilla Redmine 3.2.

I can reproduce on the latest trunk (3.2.1.devel.15244). Maybe it is caused by screen refresh when the tracker field is changed.

#9 Updated by yoshinobu yoshida over 6 years ago

thanks.
it is bug? or specification?

#10 Updated by Toshi MARUYAMA over 6 years ago

I can reproduce on vanilla Redmine 3.2 if "Default status"es of copy src and dest tracker are different.

#11 Updated by yoshinobu yoshida over 6 years ago

Toshi MARUYAMA wrote:

I can reproduce on vanilla Redmine 3.2 if "Default status"es of copy src and dest tracker are different.

realy?
I could reproduce on vanilla Redmine 3.2 even if "Default status"es of copy src and dest tracker are same.
However, if status of src and "Default status" of desc are same, cannot reproduce.

I want know whether the bug or specifications, because there is a need to fix my plugins ASAP.
Also if it is bug, which version do you fix it?

Best regards.

#12 Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from New to Needs feedback

"I can produce" and "I cannot produce" is not constructive.
Please explain more details of your condition.

yoshinobu yoshida wrote:

Also if it is bug, which version do you fix it?

Patch welcome if you think it is bug.

#13 Updated by Toshi MARUYAMA over 6 years ago

Toshi MARUYAMA wrote:

Patch welcome if you think it is bug.

With test: source:tags/3.2.1/test/ui/issues_test_ui.rb

#14 Updated by yoshinobu yoshida over 6 years ago

yoshinobu yoshida wrote:

However, if status of src and "Default status" of desc are same, cannot reproduce.

Sorry, this sentence was my misunderstanding.
Please forget.

Toshi MARUYAMA wrote:

Patch welcome if you think it is bug.

OK, I will try.

#15 Updated by yoshinobu yoshida over 6 years ago

Hi,
Does this patch has any problems?
I was wondering if you could teach me your knowledge.

diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 0618569..37c8c36 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -428,7 +428,7 @@ class IssuesController < ApplicationController
     @issue.start_date ||= Date.today if Setting.default_issue_start_date_to_creation_date?

     attrs = (params[:issue] || {}).deep_dup
-    if action_name == 'new' && params[:was_default_status] == attrs[:status_id]
+    if action_name == 'new' && params[:was_default_status] == attrs[:status_id] && !params[:copy_from]
       attrs.delete(:status_id)
     end
     if action_name == 'new' && params[:form_update_triggered_by] == 'issue_project_id'

Best regards.

Also available in: Atom PDF