Project

General

Profile

Actions

Task #2105

closed

commit & upstream bugfix for "April 31st" in bugzilla query (-6m just substracts month, without taking day-of-month into account)

Added by Christian Lohmaier over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Bugzilla
Target version:
-
Start date:
Due date:
% Done:

0%

Tags:

Description

It's used in the "find similar issues" search on the guided bugform, there it search for bugs entered in the last six months, using relative date of "-6m", bug bugzilla code
https://github.com/bugzilla/bugzilla/blob/master/Bugzilla/Search.pm#L2269-L2280 ignores any day-of week, so if it happens to be October 31st, the query will start April 31st, that will lead to postgresql error...

simple fix/workaround is to clamp the day to 28 (to also account for February), and thus be at most three days of.

$mday = $mday > 28 ? 28 : $mday; # avoid reference to April 31st or similar

was added to test & prod instance, but not to git repo/upstrem.

Actions

Also available in: Atom PDF