Patch #27008

Add new subtask - parent issue id is lost in some cases

Added by Jens Krämer 8 months ago. Updated 5 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-

Description

When the tracker of an issue has the parent_issue_id field disabled and one tries to add a subtask, it may happen that the id of the parent gets lost if the tracker that gets preselected in the new issue form is the same or also has the parent_issue_id field disabled.

The attached patch which we developed at Planio fixes this by always passing the id of a tracker with the parent_issue_id field enabled (is possible at all) through the 'Add subtask' link.

0001-try-to-always-preselect-a-suitable-tracker-for-new-s.patch Magnifier - patch against trunk (r16967) (956 Bytes) Jens Krämer, 2017-09-15 14:15

add-subtask-3_4@2x.png (39 KB) Go MAEDA, 2018-01-04 03:44

new-issue-form-3_4@2x.png (35.1 KB) Go MAEDA, 2018-01-04 03:44


Related issues

Duplicates Redmine - Defect #16260: Add Subtask does not work correctly from tasks with Paren... Closed

History

#1 Updated by Jan from Planio www.plan.io 8 months ago

  • Target version set to Candidate for next minor release

#2 Updated by Toshi MARUYAMA 7 months ago

  • Target version changed from Candidate for next minor release to 3.4.3

#3 Updated by Toshi MARUYAMA 7 months ago

  • Target version changed from 3.4.3 to 4.1.0

#4 Updated by Go MAEDA 5 months ago

I couldn't reproduce the problem (see the screenshots below). In Redmine 3.4, trackers whose "Parent task" field is disabled are not shown in the new issue form. It is because of #16260.

Could you show steps to reproduce?

#5 Updated by Felix Schäfer 5 months ago

I am sorry it seems we did not test this thoroughly enough on Redmine 3.4.0, the fix for #16260 indeed also fixes this problem. The problem we encountered was the same problem you have described in #16260#note-7.

We also had debated fixing this as it has been fixed in r16383 but had decided against fixing this in the issue.rb, as this introduces subtle differences in handling new issues. For example if you create a new issue using the API without a tracker_id but with a parent_issue_id, Redmine will automatically select a tracker that has not the parent issue field disabled. If you create a new issue using the API without a tracker_id but with a description, Redmine will not automatically select a tracker that has not the description field disabled. This means that parent_issue_id will never be "lost", but description can be lost. This is a discussion for another ticket and another time though :-)

I think this ticket can be closed as the original problem has been solved. Thank you for testing this and pointing out that it had already been fixed.

#6 Updated by Go MAEDA 5 months ago

  • Status changed from New to Closed
  • Target version deleted (4.1.0)

I am closing this issue because we confirmed this issue had already been fixed by #16260 (Redmine 3.4.0).

Felix, thank you for investigation. I do appreciate that you and people from Planio have always made fabulous contributions to Redmine.

#7 Updated by Go MAEDA 5 months ago

  • Duplicates Defect #16260: Add Subtask does not work correctly from tasks with Parent Task field disabled added

Also available in: Atom PDF