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