From d4243a68777abb0b640e6c858c0ae64ede01f59e Mon Sep 17 00:00:00 2001 From: Marc Schumann Date: Sat, 31 Mar 2012 14:56:53 +0200 Subject: Search for start-of-time-interval in date fields is (partially?) broken. r/a=LpSolit https://bugzilla.mozilla.org/show_bug.cgi?id=715270 --- Bugzilla/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla/Search.pm') diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 841df4acc..79afa6d05 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -1904,7 +1904,7 @@ sub _timestamp_translate { my $value = $args->{value}; my $dbh = Bugzilla->dbh; - return if $value !~ /^[\+\-]?\d+[hdwmy]$/i; + return if $value !~ /^[\+\-]?\d+[hdwmy]s?$/i; $args->{value} = SqlifyDate($value); $args->{quoted} = $dbh->quote($args->{value}); -- cgit v1.2.3-24-g4f1b From 6de7db5b4dab5309ca1683d58ce444cc6e6bdf88 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 4 Apr 2012 20:02:50 +0200 Subject: Bug 58179: End date not included in the Search By Change History section r=dkl a=LpSolit --- Bugzilla/Search.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/Search.pm') diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 79afa6d05..5fe88a4f2 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -1402,6 +1402,11 @@ sub _special_parse_chfield { $clause->add($from_clause); } if ($date_to ne '') { + # chfieldto is supposed to be a relative date or a date of the form + # YYYY-MM-DD, i.e. without the time appended to it. We append the + # time ourselves so that the end date is correctly taken into account. + $date_to .= ' 23:59:59' if $date_to =~ /^\d{4}-\d{1,2}-\d{1,2}$/; + my $to_clause = new Bugzilla::Search::Clause('OR'); foreach my $field (@fields) { $to_clause->add($field, 'changedbefore', $date_to); -- cgit v1.2.3-24-g4f1b