Modify

Opened 5 years ago

Closed 5 years ago

#4263 closed defect (fixed)

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

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

Description (last modified by khundeen)

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 5 years ago by khundeen

  • Description modified (diff)
  • Status changed from new to assigned

comment:2 Changed 5 years ago by khundeen

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [5420]

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 khundeen. 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.