Project

General

Profile

Actions

Defect #16260

closed

Add Subtask does not work correctly from tasks with Parent Task field disabled

Added by Domingo Galdos about 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

It's desirable sometimes to make a certain tracker designated for having child tasks only, but not having parents (a "top level" task)

Unfortunately, if you do this (by disabling "parent" field for the tracker the top-level task tracker) you lose the ability to usefully use the Add Subtask link for those issues. This is because Add Subtask currently defaults to the same tracker as the parent tracker for the child. Since the tracker does not allow the Parent task field, the linkage gets lost (even if the user manually selects another tracker -- which they will have to do anyway) and has to be re-added manually. This makes the Add Subtask link useless in this case, making it slightly less useful than just clicking New Issue.

A simple fix is to change how the default tracker is chosen after clicking Add Subtask. If the tracker that would have been chosen doesn't support being a subtask (no Parent task field) then pick another one.

The attached patch does this by sticking with the same tracker as current if it supports subtasking. If the same tracker doesn't, it picks the highest-priority (as in ORDER BY trackers.position) tracker enabled for that project that does support being a subtask.

This patch is based on 2.4.1.stable. If I am missing anything else needed to consider this patch for merging please let me know. Thanks!


Files

parent_task.patch (872 Bytes) parent_task.patch This patch is based on 2.4.1.stable. Domingo Galdos, 2014-03-06 19:57
16260-parent_task-v2.diff (803 Bytes) 16260-parent_task-v2.diff patch against 3.3.2.devel.16240 Go MAEDA, 2017-01-22 06:10
16260-parent_task-r16340.diff (835 Bytes) 16260-parent_task-r16340.diff Patch for 3.3.2.devel.16340 Go MAEDA, 2017-02-25 07:30

Related issues

Related to Redmine - Patch #22345: Trackers that have parent_issue_id in their disabled_core_fields should not be selectable for new child issuesClosedJean-Philippe Lang

Actions
Has duplicate Redmine - Patch #27008: Add new subtask - parent issue id is lost in some casesClosed

Actions
Actions

Also available in: Atom PDF