Modify

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#2562 closed defect (fixed)

Creating a new component breaks the burndown graphic for "All Components"

Reported by: joao.lopes@… 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 6 years ago by elecnix

Seems related to #721.

comment:2 Changed 6 years ago by daan

  • Owner changed from sambloomquist to daan

comment:3 Changed 6 years ago by daan

  • Resolution set to fixed
  • Status changed from new to 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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from daan. Next status will be 'closed'.
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.