Defect #26880

Cannot clear all watchers when copying an issue

Added by Go MAEDA about 1 year ago. Updated 10 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:3.4.4
Resolution:Fixed Affected version:3.4.2

Description

We can select/deselect watchers when we create an issue by copying existing issue (#10460).

But if you deselect all watchers, the original watchers are preselected in the newly created issue despite the exception that the copied issue has no watcher.

Steps to reproduce:

1. The original issue has 2 watchers.

2. Click "Copy" and deselect all watcher.

3. The newly created issue should not have any watchers but all watchers are preserved.

01-copy-source@2x.png (68.6 KB) Go MAEDA, 2017-09-11 04:37

02-deselect-watchers@2x.png (52.3 KB) Go MAEDA, 2017-09-11 04:37

03-watchers-are-preserved@2x.png (67.8 KB) Go MAEDA, 2017-09-11 04:37

fix_26880.patch Magnifier (2.08 KB) Takenori TAKAKI, 2017-12-01 09:41


Related issues

Related to Redmine - Feature #10460: Option to copy watchers when copying issues Closed

Associated revisions

Revision 17153
Added by Jean-Philippe Lang 10 months ago

Cannot clear all watchers when copying an issue (#26880).

Revision 17154
Added by Jean-Philippe Lang 10 months ago

Merged r17153 to 3.4-stable (#26880).

History

#1 Updated by Go MAEDA about 1 year ago

  • Related to Feature #10460: Option to copy watchers when copying issues added

#2 Updated by Tibor Kreiter about 1 year ago

Hi Go MAEDA!

You have to change this row in app/controllers/issue_controller:

 row:493      - @copy_watchers = User.current.allowed_to?(:add_issue_watchers, @project)
              + @copy_watchers = params[:copy_watchers].present?  || request.get?

I think it will be solve your problem.
Tibor

#3 Updated by Toshi MARUYAMA about 1 year ago

  • Status changed from New to Confirmed
  • Target version set to 3.4.4

It seems caused by #10460.

#4 Updated by Takenori TAKAKI 11 months ago

I think the attached patch will solve this problem.
this patch compatible with latest trunk (r17055).

#5 Updated by Jean-Philippe Lang 10 months ago

  • Status changed from Confirmed to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fix applied with a slightly different solution.
Thanks for pointing this out.

Also available in: Atom PDF