Defect #21485
openRoll back copied issue status when tracker change
0%
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
Updated by Toshi MARUYAMA about 9 years ago
- Subject changed from Roll back status when issue copied. to Roll back copied issue status when tracker change
Updated by Go MAEDA almost 9 years ago
I cannot reproduce.
Could you reproduce on https://my.redmine.jp/demo/ ?
Updated by yoshinobu yoshida almost 9 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:
下記リンクにて再現できました。
ステータスを「新規」に変更後、トラッカーを「機能」や「サポート」に変更した際に
ステータスが「新規」から「進行中」に戻ってしまいます。
Updated by Toshi MARUYAMA almost 9 years ago
I cannot reproduce on vanilla Redmine 3.2.
Updated by Go MAEDA almost 9 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.
Updated by yoshinobu yoshida almost 9 years ago
thanks.
it is bug? or specification?
Updated by Toshi MARUYAMA almost 9 years ago
I can reproduce on vanilla Redmine 3.2 if "Default status"es of copy src and dest tracker are different.
Updated by yoshinobu yoshida almost 9 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.
Updated by Toshi MARUYAMA almost 9 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.
Updated by Toshi MARUYAMA almost 9 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
Updated by yoshinobu yoshida almost 9 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.
Updated by yoshinobu yoshida almost 9 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.