Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8993 closed defect (fixed)

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

Reported by: ChrisNelson Owned by: ChrisNelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: rjollos 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 rjollos 3 years ago.
NoParentTicketTaskBars.png (38.8 KB) - added by rjollos 3 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 3 years ago by ChrisNelson

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

comment:2 Changed 3 years ago by ChrisNelson

  • Resolution set to fixed
  • Status changed from new to closed

Changed 3 years ago by rjollos

Changed 3 years ago by rjollos

comment:3 follow-up: Changed 3 years ago by 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:

At r10474:

comment:4 in reply to: ↑ 3 Changed 3 years ago by ChrisNelson

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 3 years ago by rjollos

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

comment:6 Changed 3 years ago by ChrisNelson

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

comment:7 Changed 3 years ago by ChrisNelson

  • Cc rjollos added; anonymous removed
  • Resolution set to fixed
  • Status changed from reopened to closed

comment:8 Changed 3 years ago by rjollos

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

comment:9 Changed 3 years ago by ChrisNelson

(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.

Add Comment

Modify Ticket

Action
as closed The owner will remain ChrisNelson.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.