Skip to content

Instantly share code, notes, and snippets.

@yc0
Created April 21, 2017 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yc0/25dd3ba6cde7122e06edbc744aa62371 to your computer and use it in GitHub Desktop.
Save yc0/25dd3ba6cde7122e06edbc744aa62371 to your computer and use it in GitHub Desktop.
[redmine]allow you modify your parent later without changing the tracker id
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment