#2562 closed defect (fixed)
Creating a new component breaks the burndown graphic for "All Components"
Reported by: | Owned by: | daan | |
---|---|---|---|
Priority: | high | Component: | ScrumBurndownPlugin |
Severity: | critical | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
If I add a new component to TRAC, the burndown for the "All Components" is lost.
This happens because of these lines:
root/scrumburndownplugin/burndown/burndown.py:
214 if len(component_data) > 0 and component_data[component_data.keys()[0]]: 215 burndown_length = len(component_data[component_data.keys()[0]]) 216 else: 217 burndown_length = 0
If the just created component is the first on the list "component_data.keys()", then component_data[component_data.keys()[0]] is "[] == False".
proposed solution:
if len(component_data) > 0: biggest_element = reduce(lambda x,y: max(x,y, key=len), component_data.values()) burndown_length = len( biggest_element ) else: burndown_length = 0
This code is for python 2.5
Attachments (0)
Change History (3)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Owner: | changed from Sam Bloomquist to daan |
---|
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [5058]) Release of version 1.9.1 of the Trac Scrum burndown plugin. See http://stuq.nl/weblog/2008-12-25/scrum-burndown-plugin-191-released for more information.
A new version of the Scrum Burndown plugin for Trac is released, bringing compatibility for PostgreSQL, MySQL, Trac 0.11.2.1, and many bug fixes. Upgrading is recommended.
New features The Scrum burndown plugin is currently compatible and tested with Trac 0.10.5, Trac 0.11.1, Trac 0.11.2.1 Python 2.4 and Python 2.5. Additional to the previous SQLite compatibility, support for both PostgreSQL 8.3 and MySQL 5 has been added.
The following issues are fixed:
- Fixes #1462 better control of milestone: a way to ‘reset’ a milestone
- Fixes #1217 database upgrade fails after installing latest scrumburndownplugin
- Fixes #2476 Error: ‘line_graph’ is undefined - stop graph from displaying
- Fixes #1730 couldn’t upgrade
- Fixes #2729 Error while running under PostgreSQL
- Fixes #3102 burndown_job.py fails INSERT NULL id
- Fixes #1909 Overshooting estimate reduces remaining effort while ticket is open
- Fixes #1189 TracBurndown-01.05.10-py2.4.egg error
- Fixes #1800 No chart when clicking Burndown chart button.
- Fixes #4047 AttributeError: ‘NoneType’ object has no attribute ‘getValue’
- Fixes #2224 Changing ticket component causes removal from burndown
- Fixes #2562 Creating a new component breaks the burndown graphic for “All Components”
- Fixes #4222 Install fails on mysql
- Fixes #2218 ScrumBurndownPlugin, trac 0.10.4, mysql
Seems related to #721.