]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 58179: End date not included in the Search By Change History section
authorFrédéric Buclin <LpSolit@gmail.com>
Wed, 4 Apr 2012 18:00:15 +0000 (20:00 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 4 Apr 2012 18:00:15 +0000 (20:00 +0200)
r=dkl a=LpSolit

Bugzilla/Search.pm

index 7bf7e69f6e85033ab02f50c2b556f4648ddb3451..64642774d441ab384e72ed56d8806bb2e6869ce3 100644 (file)
@@ -1414,6 +1414,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);