Opened 9 years ago

Closed 7 years ago

Setting weekends to false causes burndown line to disappear

Reported by: Owned by: anonymous Joachim Hoessler normal EstimationToolsPlugin normal 0.11

Description

I am attempting to display a burndown chart as follows.

[[BurndownChart(milestone=TBR 2.0, startdate=2009-07-08)]]


This works correctly, but if I try setting weekends to false the burndown line disappears.

[[BurndownChart(milestone=TBR 2.0, startdate=2009-07-08, weekends=False)]]


I looked through the code and am uncertain what the problem is.

comment:1 Changed 8 years ago by evan

I am having this same issue. I thought it might be a timezone issue, but the server is correctly set to Australian Easter Standard Time.

comment:3 follow-up:  4 Changed 8 years ago by François Boissonneault

Yes, we've seen this too. I believe the calculation of "days" removed from the burndown based on the number of weekends (or whatsoever) is wrong. It would be cool to get a fix for this too (but also cool to be able to manually set what days we're off).

comment:4 in reply to:  3 Changed 8 years ago by osimons

It would be cool to get a fix for this too (but also cool to be able to manually set what days we're off).

Agreed. I'd like to see a more flexible handling of this as well. I'm thinking of something like nowork=weekends|2010-08-17|2010-08-24:2010-08-25 where weekends is just a keyword that gets expanded to appropriate days (like now) but where also single days or ranges are accepted.

With something like this the weekends argument should be removed, and the toggle of display could also be done as part of the nowork argument by supporting an optional hide word.

A default of nowork=weekends mimics the current defaults. Using nowork=weekeds|hide would remove weekeds just like weekeds=false.

Anyway, the idea is good but the syntax may need verification by others. I'll help out with a patch if you think this is a good idea.

comment:5 Changed 8 years ago by osimons

I noticed this bug earlier, and intended to look at it again after I got [8758] committed. But now I can't recreate the bug... Have I somehow unintentionally improved this, or can someone still offer me a non-working example using latest trunk version?

possible fix

comment:6 Changed 7 years ago by mnsh

I ran into this problem with latest trunk, and I think I see why it happens: _scale_data() assumes that enddate - startdate is the number of dates we're dealing with, which is no longer true after the weekends have been removed.

See if attachment:estimationtools.patch solves this for you.

comment:7 Changed 7 years ago by osimons

Resolution: → fixed new → closed

(In [9947]) EstimationToolsPlugin: Fix for burndown chart line disappearing with weekends=False set.

Solution provided by mnsh (thanks!), and I've added some tests that verifies what should be the correct scaling. Closes #5545.

Modify Ticket

Change Properties