]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Allow querying of bug creation times.
authorterry%mozilla.org <>
Thu, 6 May 1999 04:18:38 +0000 (04:18 +0000)
committerterry%mozilla.org <>
Thu, 6 May 1999 04:18:38 +0000 (04:18 +0000)
CHANGES
buglist.cgi
makebugtable.sh
query.cgi

diff --git a/CHANGES b/CHANGES
index 14336949bb98228b23fb08a77bb0ba358a8c5377..eb2fbb78bde776b6cd33df0a829d2bea887ea57f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,12 @@ query the CVS tree.  For example,
 will tell you what has been changed in the last week.
 
 
+5/5/99 Added the ability to search by creation date.  To make this perform
+well, you ought to do the following:
+
+       alter table bugs change column creation_ts creation_ts datetime not null, add index (creation_ts);
+
+
 4/30/99 Added a new severity, "blocker".  To get this into your running
 Bugzilla, do the following:
 
index a8c10d1c29a9c52a980404c247d4bc2d2eb5f074..9d42528edd316c790c54d7def1cb149e4eacd369 100755 (executable)
@@ -359,7 +359,23 @@ sub SqlifyDate {
 }
 
 
-        
+if (defined $ref) {
+    my $which = lsearch($ref, "[Bug creation]");
+    if ($which >= 0) {
+        splice(@$ref, $which, 1);
+        $query .= "and bugs.creation_ts >= " .
+            SqlifyDate($::FORM{'chfieldfrom'}) . "\n";
+        my $to = $::FORM{'chfieldto'};
+        if (defined $to) {
+            $to = trim($to);
+            if ($to ne "" && $to !~ /^now$/i) {
+                $query .= "and bugs.creation_ts <= " .
+                    SqlifyDate($to) . "\n";
+            }
+        }
+    }
+}        
+
 
 
 if (defined $ref && 0 < @$ref) {
index c142b2d5a526d6f07fbf26db715663287665e4c3..18d83a66ca664320dacfd997f6d8ecce71121e87 100755 (executable)
@@ -34,7 +34,7 @@ assigned_to mediumint not null, # This is a comment.
 bug_file_loc text,
 bug_severity enum("blocker", "critical", "major", "normal", "minor", "trivial", "enhancement") not null,
 bug_status enum("NEW", "ASSIGNED", "REOPENED", "RESOLVED", "VERIFIED", "CLOSED") not null,
-creation_ts datetime,
+creation_ts datetime not null,
 delta_ts timestamp,
 short_desc mediumtext,
 long_desc mediumtext,
@@ -52,6 +52,7 @@ qa_contact mediumint not null,
 status_whiteboard mediumtext not null,
 
 index (assigned_to),
+index (creation_ts),
 index (delta_ts),
 index (bug_severity),
 index (bug_status),
index 5ee513ec0e99c2c0ffd151f275afdb91d5271826..83609b0a789b8cefd641394743506b5f97b6b873 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -345,6 +345,8 @@ push @::legal_target_milestone, "---"; # Oy, what a hack.
 
 print $jscript;
 
+my @logfields = ("[Bug creation]", @::log_columns);
+
 print "
 <FORM NAME=queryForm METHOD=GET ACTION=\"buglist.cgi\">
 
@@ -403,7 +405,7 @@ Changed in the <NOBR>last <INPUT NAME=changedin SIZE=2 VALUE=\"$default{'changed
 <td rowspan=2 align=right>Where the field(s)
 </td><td rowspan=2>
 <SELECT NAME=\"chfield\" MULTIPLE SIZE=4>
-@{[make_options(\@::log_columns, $default{'chfield'}, $type{'chfield'})]}
+@{[make_options(\@logfields, $default{'chfield'}, $type{'chfield'})]}
 </SELECT>
 </td><td rowspan=2>
 changed.