Project

General

Profile

Actions

Defect #21485

open

Roll back copied issue status when tracker change

Added by yoshinobu yoshida about 9 years ago. Updated almost 9 years ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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
Actions #1

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
Actions #2

Updated by yoshinobu yoshida almost 9 years ago

excuse me, answer please...

Actions #3

Updated by Go MAEDA almost 9 years ago

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

Actions #4

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

Actions #5

Updated by yoshinobu yoshida almost 9 years ago

excuse me...

Actions #6

Updated by yoshinobu yoshida almost 9 years ago

answer please...

Actions #7

Updated by Toshi MARUYAMA almost 9 years ago

I cannot reproduce on vanilla Redmine 3.2.

Actions #8

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.

Actions #9

Updated by yoshinobu yoshida almost 9 years ago

thanks.
it is bug? or specification?

Actions #10

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.

Actions #11

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.

Actions #12

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.

Actions #13

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

Actions #14

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.

Actions #15

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.

Actions

Also available in: Atom PDF