Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8993 closed defect (fixed)

Using root= for a ticket in the middle of a hierarchy breaks rollup

Reported by: Chris Nelson Owned by: Chris Nelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: Ryan J Ollos Trac Release: 0.11

Description

If you have a hierarchy like

A
 B
  C
  D
 E
  F
  G

and display a Gantt with root=B, C and D are not indented and B does not show the cumulative time for them.

Attachments (2)

CorrectSpans.png (49.5 KB) - added by Ryan J Ollos 13 years ago.
NoParentTicketTaskBars.png (38.8 KB) - added by Ryan J Ollos 13 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 13 years ago by Chris Nelson

(In [10475]) Changes root ticket's parents to 0 for easier processing. Refs #8993

comment:2 Changed 13 years ago by Chris Nelson

Resolution: fixed
Status: newclosed

Changed 13 years ago by Ryan J Ollos

Attachment: CorrectSpans.png added

Changed 13 years ago by Ryan J Ollos

Attachment: NoParentTicketTaskBars.png added

comment:3 Changed 13 years ago by Ryan J Ollos

Following this change, with a macro call [[TracJSGanttChart(milestone=M1 - I9,lwidth=800,colorBy=owner)]], the parent tickets no longer span the child ticket's start and end dates:

At r10474:

comment:4 in reply to:  3 Changed 13 years ago by Chris Nelson

Resolution: fixed
Status: closedreopened

Replying to rjollos:

Following this change, with a macro call [[TracJSGanttChart(milestone=M1 - I9,lwidth=800,colorBy=owner)]], the parent tickets no longer span the child ticket's start and end dates: ...

So this change causes the problem for you that it fixes for me? :-(

Try this (untested):

  • tracjsgantt/tracjsgantt.py

    diff --git a/tracjsgantt/tracjsgantt.py b/tracjsgantt/tracjsgantt.py
    index 4f3c606..500fe5a 100644
    a b class TracJSGanttChart(WikiMacroBase): 
    701701            task += '%s,' % 0
    702702       
    703703        # pParent (parent task ID)
    704         if options['root'] and str(ticket['id']) not in options['root'].split('
     704        if self.fields['parent'] \
     705                and (not options['root']
     706                     or str(ticket['id']) not in options['root'].split('|')):
    705707            task += '%s,' % ticket[self.fields['parent']]
    706708        else:
    707709            task += '%s,' % 0

comment:5 Changed 13 years ago by Ryan J Ollos

I will be testing and getting back to you shortly. Thanks!

comment:6 Changed 13 years ago by Chris Nelson

(In [10479]) Fixed bug when root was not specified. Refs #8993.

comment:7 Changed 13 years ago by Chris Nelson

Cc: Ryan J Ollos added; anonymous removed
Resolution: fixed
Status: reopenedclosed

comment:8 Changed 13 years ago by Ryan J Ollos

I updated to r10479 and it's working well. Thanks!

comment:9 Changed 13 years ago by Chris Nelson

(In [10529]) Fixed bug when root==self, and root had parents. Refs #8993.

When root==self, the current ticket's id couldn't appear in root because root equaled 'self' rather then the id it represents. This fix checks the current ticket's id when root==self.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Chris Nelson.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.