diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-04-10 20:38:05 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-04-10 20:38:05 +0200 |
commit | d1559509efb909ca2ab98f6c675d97b842e5e8d3 (patch) | |
tree | fc43583f6e2010c9a7a18a2e03bd3d3e455c16c3 /Bugzilla/Search.pm | |
parent | eec1169f0db5257c50ebbe7a51dab9846173b3bc (diff) | |
parent | 6de7db5b4dab5309ca1683d58ce444cc6e6bdf88 (diff) | |
download | bugzilla-d1559509efb909ca2ab98f6c675d97b842e5e8d3.tar.gz bugzilla-d1559509efb909ca2ab98f6c675d97b842e5e8d3.tar.xz |
merged with bmo/4.2
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r-- | Bugzilla/Search.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 2655ec467..c52f8a22d 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); @@ -1904,7 +1909,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}); |