Modify

Opened 9 years ago

Closed 8 years ago

#4263 closed defect (fixed)

tracmetrix pdashboard does not create backlog statistics for december (month=12)

Reported by: anonymous Owned by: Bhuricha Deen Sethanandha
Priority: high Component: TracMetrixPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description (last modified by Bhuricha Deen Sethanandha)

in web_ui.py:

def last_day_of_month(year, month):

return datetime(year, (month%12)+1, 1, tzinfo=utc) - timedelta(days=1)

contains a bug because it will produce:

2007-12-31 00:00:00+00:00

and not

2008-12-31 00:00:00+00:00

for december 2008.

it computes one day before january 1st of the current year (not the next).

this can be fixed by changing the return line to:

return datetime(year+(month/12), (month%12)+1 , 1, tzinfo=utc) - timedelta(days=1)

and thereby adding 1 to the year in case the month is december.

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by Bhuricha Deen Sethanandha

Description: modified (diff)
Status: newassigned

comment:2 Changed 8 years ago by Bhuricha Deen Sethanandha

Resolution: fixed
Status: assignedclosed

Fixed in [5420]

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Bhuricha Deen Sethanandha.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.