Modify ↓
Opened 6 years ago
Closed 5 years ago
#13774 closed enhancement (fixed)
Add grandchildren tickets to the child ticket section on a ticket
| Reported by: | Owned by: | Cinc-th | |
|---|---|---|---|
| Priority: | lowest | Component: | ChildTicketsPlugin |
| Severity: | minor | Keywords: | |
| Cc: | Trac Release: |
Description
Would it be possible to add grandchildren into the Child Ticket table?
Attachments (0)
Change History (4)
comment:1 Changed 6 years ago by
comment:2 Changed 5 years ago by
| Owner: | changed from Mark Ryan to Cinc-th |
|---|---|
| Status: | new → assigned |
Note: See
TracTickets for help on using
tickets.



Possible solution (I know it should be cleaner by I am not the python wizard most of you are):
Update to childtickets.py in function
def filter_streamfrom:childtickets = [Ticket(self.env, n) for n in self.childtickets.get(ticket.id, [])] # (tempish) fix for #8612 : force sorting by ticket id childtickets = sorted(childtickets, key=lambda t: t.id)to:
childtickets = [Ticket(self.env, n) for n in self.childtickets.get(ticket.id, [])] for child in childtickets: if not isinstance(child, Ticket): continue grandChildTickets = self.childtickets.get(child.id,[]) if len(grandChildTickets) == 0: continue for grandChild in grandChildTickets: childtickets.append( Ticket(env, grandChild) ) # (tempish) fix for #8612 : force sorting by ticket id childtickets = sorted(childtickets, key=lambda t: t.id)