Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#7225 closed defect (fixed)

[patch] Milestones don't show up in calendar if their due time is not 00:00:00 (h:m:s)

Reported by: delsauce@… Owned by: Steffen Hoffmann
Priority: normal Component: WikiTicketCalendarMacro
Severity: major Keywords: 0.11 0.12 milestone
Cc: Ryan J Ollos Trac Release: 0.11

Description

Not sure why the due time of milestones in our install is not 00:00:00, but they are. When this is the case, no milestones will show up in the calendar because the SELECT statement in the macro that searches for the milestones is looking for an exact time match.

I modified the query so that the milestone time isn't taken into consideration (the entire day will match). Here is the line of code that was changed:

 cursor.execute("""
                        SELECT name
                          FROM milestone
                         WHERE due >= %s and due < %s
                    """, (duedatestamp,duedatestamp_eod, ))

Attachments (0)

Change History (6)

comment:1 Changed 7 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed
Owner: changed from Ryan J Ollos to Steffen Hoffmann

comment:2 Changed 7 years ago by Ryan J Ollos

Based on the number of tickets opened, this certainly seems to be a popular macro!

comment:3 Changed 7 years ago by Steffen Hoffmann

Keywords: 0.11 0.12 milestone added
Severity: normalmajor
Status: newassigned
Summary: Milestones don't show up in calendar if their due time is not 00:00:00 (h:m:s)[patch] Milestones don't show up in calendar if their due time is not 00:00:00 (h:m:s)

Glad you found it. I was already suspecting a bug in the milestone part, since my test milestones did never show up as well.

I confirm that this flaw exist not only in the current version from 0.11 branch but up from the first publicly released version up to the latest development version in trunk. In short: this never work, despite all data necessary (duedatestamp, duedatestamp_eod) was prepared and in place.

I've build a fixed version of trunk with the suggested code improvement and it's working well. I'll merge the change to all branches now. Expect a new maintenance release tonight.

comment:4 Changed 7 years ago by Steffen Hoffmann

Let's aim at fixing this within one hour after ticket creation to account for the high popularity. :-)

comment:5 Changed 7 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

(In [8108]) WikiTicketCalendarMacro: Improve milestone query to actually make it work right, closes #7225.

This is a long standing flaw persisting from the earliest version up to current trunk. Thanks to delsauce@… for report and suggested code change.

comment:6 Changed 7 years ago by delsauce@…

No worries-- glad to help. Thanks for resolving so quickly.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.