Modify

Opened 5 years ago

Last modified 5 years ago

#5593 new defect

Problems for burndown-chart for multiple milestone

Reported by: viola@… Owned by: hoessler
Priority: normal Component: EstimationToolsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

First: Thanks for this - works very good for us!

Then From the examples, I learned that one should be able to say:

BurndownChart(milestone=PG|38, startdate=2009-06-07)

But this for me produces: Error: Macro BurndownChart(milestone=PG|38, startdate=2009-06-07) failed status

Attachments (0)

Change History (6)

comment:1 Changed 5 years ago by hoessler

Do you also get an error if you try to render charts for the milestones "PG" and "38" separately?

comment:2 Changed 5 years ago by anonymous

Thanks for supporting! - No, actually I can render the single milestones well.

comment:3 Changed 5 years ago by hoessler

Mmh, that sounds very strange... I'm poking in the dark here, but could you check if

[[TicketQuery(milestone=PG|38)]]

works? The BurnDown macro uses the same query mechanism as the TicketQuery macro, so it would be interesting if that macro returns an error, too.

comment:4 Changed 5 years ago by anonymous

Sorry for the delay - the TicketQuery works perfectly.

Sorry again - I should have taken a look into the log and told you right away:

2009-08-05 09:23:41,210 Trac[formatter] ERROR: Macro BurndownChart(milestone=PG|39, startdate=2009-06-07) failed
Traceback (most recent call last):
  File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/wiki/formatter.py", line 468, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/wiki/formatter.py", line 179, in process
    text = self.processor(text)
  File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/wiki/formatter.py", line 166, in _macro_processor
    text)
  File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/wiki/macros.py", line 66, in expand_macro
    return self.render_macro(formatter.req, name, content)
  File "build/bdist.linux-x86_64/egg/estimationtools/burndownchart.py", line 64, in render_macro
    timetable = self._calculate_timetable(options, query_args, req)
  File "build/bdist.linux-x86_64/egg/estimationtools/burndownchart.py", line 162, in _calculate_timetable
    latest_status = t['status']
KeyError: 'status'

and - only to mention it, don't know if that has something to do with the Burndown chart: We obviously have another problem with the CustomRoadmap plugin we also installed:

2009-08-05 09:23:41,660 Trac[main] ERROR: syntax error: line 1, column 0 (/srv/svn/trac/plosam/.egg-cache/TracCustomRoadmap-0.4-py2.5.egg-tmp/customroadmap/templates/roadmap.css, line 1)
Traceback (most recent call last):
  File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 219, in dispatch
    data, content_type)
  File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 683, in render_template
    template = self.load_template(filename, method=method)
  File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 667, in load_template
    return self.templates.load(filename, cls=cls)
  File "build/bdist.linux-x86_64/egg/genshi/template/loader.py", line 227, in load
    filename, encoding=encoding)
  File "build/bdist.linux-x86_64/egg/genshi/template/loader.py", line 265, in _instantiate
    allow_exec=self.allow_exec)
  File "build/bdist.linux-x86_64/egg/genshi/template/base.py", line 379, in __init__
    raise TemplateSyntaxError(e.msg, self.filepath, e.lineno, e.offset)
TemplateSyntaxError: syntax error: line 1, column 0 (/srv/svn/trac/plosam/.egg-cache/TracCustomRoadmap-0.4-py2.5.egg-tmp/customroadmap/templates/roadmap.css, line 1)

comment:5 Changed 5 years ago by anonymous

I have been able to track this down: Under trac-0.11, the field status seems not to be contained in a ticket query by default. Since it is accessed, an error occurs.

This can simply be fixed by adding an entry to DEFAULT_OPTIONS in burndownchart.py:

DEFAULT_OPTIONS = {'width': '800', 'height': '200', 'color': 'ff9900', 'expected': '0',
                   'bgcolor': 'ffffff00', 'wecolor':'ccccccaa', 'colorexpected': 'ffddaa', 'weekends':'true', 'gridlines' : '0', 'col' : 'status'}

comment:6 Changed 5 years ago by hoessler

Its great that you were able to solve that problem for you. However, I wonder why I cannot reproduce the problem here with trac v0.11.2. What version of trac are you using exactly?

Add Comment

Modify Ticket

Action
as new The owner will remain hoessler.
Author


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

 
Note: See TracTickets for help on using tickets.