Add search by time owner has been idle

RESOLVED FIXED in Bugzilla 2.18

Status

()

P3
normal
RESOLVED FIXED
15 years ago
6 years ago

People

(Reporter: bugreport, Assigned: bugreport)

Tracking

2.17.1
Bugzilla 2.18
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

15 years ago
To determine if a bug is suffering from inattention, a boolean search field is
needed that compares its argument to the amount of time (hours or days) that the
bug has been continuously assigned to the same person but that person has done
nothing.
(Assignee)

Comment 1

15 years ago
Created attachment 149474 [details] [diff] [review]
Patch - Adds search for "Time Since Owner Touched"

Adds search for "Time Since Owner Touched" which can be specified as a number
of days (default) or the interval can be suffixed with "h" to indicate a number
of hours.
(Assignee)

Updated

15 years ago
Attachment #149474 - Flags: review?
(Assignee)

Updated

15 years ago
Attachment #149474 - Flags: review?(erik)
should it allow the same syntax as SqlifyDate for consistency?  This would mean
using a 'd' for days, and allowing 'w' for weeks, etc.  Would it confuse it too
badly to just use SqlifyDate on it? :)  (just an idea)
(Assignee)

Comment 3

15 years ago
I could add the changes to make it support a superset of what sqlifydate does. 
As for using that routine....  no.  sqlifydate need to be replaced.  It shuld
leave the sql server to do the date math.

Comment 4

15 years ago
Comment on attachment 149474 [details] [diff] [review]
Patch - Adds search for "Time Since Owner Touched"

>I could add the changes to make it support a superset of what sqlifydate does. 
>As for using that routine....  no.  sqlifydate need to be replaced.  It shuld
>leave the sql server to do the date math.

At least relative weeks and months are useful, and once we're there, I think
it's easiest for the user if same relative date expressions are supported as
everywhere else. Can the relative date handling part of SqlifyDate be
abstracted out and used here? While I agree date math should be done on the DB,
I'd say it's better to just use one strategy (either app-tier date math or
db-tier one; not both). 

>Index: Bugzilla/Search.pm
>===================================================================

>+                my $notifless; 
>+                my $orifless;
>+                if ($t =~ /great/) {
>+                    $notifless = "";
>+                    $orifless = "AND";
>+                } else {
>+                    $notifless = "NOT";
>+                    $orifless = "OR";
>+                }; 

You know, this is pretty horrible. ;-) "notifless" makes sense - in a way - but
this is really hard to understand. I'd suggest not getting these operators into
variables, but rather using ?: operator to put them into place later on. If you
really feel this is better, I'm not going to jump on the walls, but this is
sick anyway. ;)

I'd say use the regexp to populate a boolean like "searchforgreater" (which is
true if $t =~ /great/). You could use that boolean in your ?: expressions later
on in the code. I think I'd be able to read that one :-)

>+                $v =~ /(\d+)(h|H)?/;

Please allow \s* between the \d+ and time unit (which would be so much nicer as
([hH]) or perhaps even /i :-)) Although if you expand the syntax, the regexp
will probably get rewritten anyway...


Tested and works, but let's resolve the stuff above first.
Attachment #149474 - Flags: review? → review-
(Assignee)

Comment 5

15 years ago
Created attachment 149671 [details] [diff] [review]
Patch v2

This cleans up the items from jouni's review.  It keeps the data math in the
databasse.  sqlifydate needs to be fixed, but that is a differrent bug.
(Assignee)

Updated

15 years ago
Attachment #149474 - Attachment is obsolete: true
(Assignee)

Updated

15 years ago
Attachment #149671 - Flags: review?(jouni)
(Assignee)

Updated

15 years ago
Attachment #149474 - Flags: review?(erik)

Comment 6

15 years ago
Comment on attachment 149671 [details] [diff] [review]
Patch v2

Indentation nitpicking rules!

>Index: Bugzilla/Search.pm

>+                my $cutoff = "DATE_SUB(NOW(), 
>+                                  INTERVAL $quantity $unitinterval)";

Please align I of INTERVAL under D of DATE_SUB.

>+                    push(@wherepart, "(comment_$table.who IS NULL " .
>+                        "AND activity_$table.who IS NULL)");
>+                    push(@wherepart, "(comment_$table.who IS NOT NULL " .
>+                        "OR activity_$table.who IS NOT NULL)");


I'd prefer a solution where the string catenation parts are aligned. The
following is my favorite:

		    push(@wherepart, "(comment_$table.who IS NULL " .
				     "AND activity_$table.who IS NULL)");

Other than those, good work. I still disagree on two separate approaches to
date math, but the "that's another bug" approach is fine with me. Just this
once. ;-)

r=jouni
Attachment #149671 - Flags: review?(jouni) → review+
(Assignee)

Updated

15 years ago
Status: NEW → ASSIGNED
Flags: approval?
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.18
Hmm, this looks like the kind of relatively small, low-risk feature we're
willing to take for 2.18 although we aren't taking new features in general. a=myk
Flags: approval? → approval+
(Assignee)

Comment 8

15 years ago
checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Flags: documentation?
Resolution: --- → FIXED
Flags: documentation2.18?

Comment 9

12 years ago
There is actually no list where fields accessible from boolean charts are described. Maybe there should be one, but this should include all fields, not only the one implemented in this bug, and so should be done in a separate bug.

Removing these flags per discussion with justdave on IRC.
Flags: documentation?
Flags: documentation2.18?
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.