Project

General

Profile

lft/rgt - getting an issue with all parent tasks

Added by Anders Aagaard over 13 years ago

Hi

I'm making a "overview" screen. I've gotten quite far, and it's in use in my company now. The overview screen should include all tasks assigned to you, but it shows subtasks in a tree. So if a parent task is assigned to someone else, it'll still show that task.

What I need is a Issue.find command to:
Get all issues with a certain condition
- including all parent tasks.

I'm doing this "manually" now (in ruby) to produce a tree of:
issue[nil] = [all issues, including tasks not assigned to me]
issue[issue.id of parent task not assigned to me] = [issue list]

I'm really struggeling finding a good way of doing that. I need a tree of issues assigned to me, with parent tasks visible (in a tree, so subtasks of subtasks work).


Replies (2)

RE: lft/rgt - getting an issue with all parent tasks - Added by Felix Schäfer over 13 years ago

The issues use the awesome_nested_set plugin (source:trunk/vendor/plugins/awesome_nested_set), it has some helpful methods to get the children/parents/whole tree, you will still need to filter out the ones the user isn't allowed to see, but there are helpers for that too.

RE: lft/rgt - getting an issue with all parent tasks - Added by Anders Aagaard over 13 years ago

Thank you! That put me on the right track and I got it working :)

    (1-2/2)