In redmine backlog plugin, we confronted the backlog constricts subtasks’ type of tracker. Here is the patch context. we can avoid forcing tracking of subtacks in backlog
118,121c118
< # https://github.com/backlogs/redmine_backlogs/issues/547
< #--> FIX: DO NOT FORCE TRACKER OF SUBTASKS IN FEATURES TO TASK
< # the following line is marked and modified by nelson @ 12.13.2016
< # self.tracker = Tracker.find(RbTask.tracker) unless self.tracker_id == RbTask.tracker --- > self.tracker = Tracker.find(RbTask.tracker) unless self.tracker_id == RbTask.tracker
197c181,182
< self.fixed_version_id, self.fixed_version_id]).to_a --- > self.fixed_version_id, self.fixed_version_id,
> RbTask.tracker]).to_a
However, the modification may happen a bug while you try modify the parent of issue after creating the issue.
The bug is that the issue will forcibly change its tracker id according to the parent. It might be correct behavior for some cases.
But If you deem the cases confuse you, you can alter the code as follows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# plugins/redmine_backlogs/lib/backlogs_issue_patch.rb | |
def backlogs_after_save | |
# .. | |
# omitted | |
# .. | |
if self.story? | |
# omitted | |
tasklist = RbTask.find(:all, :conditions => ["root_id=? and lft>? and rgt<? and | |
( | |
(? is NULL and not fixed_version_id is NULL) | |
or | |
(not ? is NULL and fixed_version_id is NULL) | |
or | |
(not ? is NULL and not fixed_version_id is NULL and ?<>fixed_version_id) | |
) and tracker_id = ?", self.root_id, self.lft, self.rgt, | |
self.fixed_version_id, self.fixed_version_id, | |
self.fixed_version_id, self.fixed_version_id, | |
RbTask.tracker]).to_a | |
# omitted | |
end | |
# omitted | |
end |