Closed
Bug 283609
Opened 19 years ago
Closed 15 years ago
Search for relative dates in deadline
Categories
(Bugzilla :: Query/Bug List, enhancement)
Bugzilla
Query/Bug List
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: havardw+bugzilla, Assigned: gregaryh)
References
Details
Attachments
(1 file, 2 obsolete files)
2.18 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050221 Epiphany/1.5.6 (Ubuntu) (Ubuntu package 1.0+dfsg.1-6ubuntu1) Build Identifier: It would be nice if it was possible to search for relative dates in deadline, in a similar way to the date ranges in "Bug Changes". Some use cases for this would be to send whine mail for all open bugs that have passed the deadline, or a saved search that shows bugs with deadline in the next week. Reproducible: Always Steps to Reproduce:
Reporter | ||
Comment 1•19 years ago
|
||
I found out that it's possible to search for relative dates with the boolean query operators, so I have no objections if someone wants to 'WONTFIX' this.
Comment 2•19 years ago
|
||
It seems silly to have exceptions to the ability to usea relative date in a field that simply asks for a date. We may as well add this (eventually)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•19 years ago
|
||
patch to BUGZILLA-2_20-BRANCH to allow relative dates in deadline fields
Comment 4•19 years ago
|
||
How do you search for tickets with boolean operators between today and 7 days from now?
Comment 5•18 years ago
|
||
(In reply to comment #1) > I found out that it's possible to search for relative dates with the boolean > query operators, so I have no objections if someone wants to 'WONTFIX' this. I would like to know this, too. Could you please explain how tow use relative dates with boolean query operators!
Comment 6•18 years ago
|
||
I just tried the provided patch and had to realize, that searching with relative dates only works in one direction: Searching for bugs that have a deadline from "1y" and till "now" are found properly, but I can't find bugs from "now" till "1y" (=> all bugs, that have a deadline within one year from now on). So the patch only provides search capabilities with relative features in the past, not in the future or did is miss anything?
Updated•18 years ago
|
OS: Linux → All
Hardware: PC → All
Comment 7•18 years ago
|
||
Magnus, are you interested in porting your patch to the CVS tip?
Assignee: query-and-buglist → mlewissmith
Target Milestone: --- → Bugzilla 2.24
Comment 8•18 years ago
|
||
(In reply to comment #6) You can find all bugs with a deadline within one year from now on using a boolean search “deadline”-“is less than”-“+1y”. The “+” sign is important, letting it point into the future. If you omit the sign, “-” is implied.
Comment 9•18 years ago
|
||
Is there already a patch for Bugzilla 2.22?
Comment 10•18 years ago
|
||
(In reply to comment #9) > Is there already a patch for Bugzilla 2.22? No, there isn't. If there were one, you'd find it in the attachments on this bug.
Comment 11•18 years ago
|
||
Well, I don't know how to create a patch-file, but I just tried to migrate the patch of Magnus from version 2.20 to version 2.22. I think it should work, when you replace lines 351 to 368 of bugzilla-2.22\Bugzilla\Search.pm with the following code: --------------------snip-------------------- if ($params->param('deadlinefrom')){ $deadlinefrom = trim(lc($params->param('deadlinefrom'))); $deadlinefrom = '' if ($deadlinefrom eq 'now'); # validate_date($deadlinefrom) # || ThrowUserError('illegal_date', {date => $deadlinefrom, # format => 'YYYY-MM-DD'}); $sql_deadlinefrom = &::SqlQuote(SqlifyDate($deadlinefrom)); push(@wherepart, "bugs.deadline >= $sql_deadlinefrom"); } if ($params->param('deadlineto')){ $deadlineto = trim(lc($params->param('deadlineto'))); $deadlineto = '' if ($deadlineto eq 'now'); # validate_date($deadlineto) # || ThrowUserError('illegal_date', {date => $deadlineto, # format => 'YYYY-MM-DD'}); $sql_deadlineto = &::SqlQuote(SqlifyDate($deadlineto)); push(@wherepart, "bugs.deadline <= $sql_deadlineto"); } --------------------snap-------------------- PS: template/en/default/search/search-help.html.tmpl can stay as it is (after patching with the patch for 2.20), because the help doesn't need to be changed in the new version.
Comment 12•18 years ago
|
||
This bug is retargetted to Bugzilla 3.2 for one of the following reasons: - it has no assignee (except the default one) - we don't expect someone to fix it in the next two weeks (i.e. before we freeze the trunk to prepare Bugzilla 3.0 RC1) - it's not a blocker If you are working on this bug and you think you will be able to submit a patch in the next two weeks, retarget this bug to 3.0. If this bug is something you would like to see implemented in 3.0 but you are not a developer or you don't think you will be able to fix this bug yourself in the next two weeks, please *do not* retarget this bug. If you think this bug should absolutely be fixed before we release 3.0, either ask on IRC or use the "blocking3.0 flag".
Target Milestone: Bugzilla 3.0 → Bugzilla 3.2
Comment 13•17 years ago
|
||
FYI: You can search using relative dates on the Deadline in Bugzilla 3.0 using the boolean charts. I tested with "greater than" and "less than", and with values of "+1d", "-1d", etc. It would probably very useful to have this functionality in the "Deadline From/To" area as well.
Comment 15•16 years ago
|
||
Bugzilla 3.2 is now frozen. Only enhancements blocking 3.2 or specifically approved for 3.2 may be checked in to the 3.2 branch. If you would like to nominate your enhancement for Bugzilla 3.2, set the "blocking3.2" flag to "?", and either the target milestone will be changed back, or the blocking3.2 flag will be granted, if we will accept this enhancement for Bugzilla 3.2.
Target Milestone: Bugzilla 3.2 → Bugzilla 4.0
Comment 16•15 years ago
|
||
With the newer version allowing custom fields, one of them being a date field, all boolean searches involving a date filed should allow a relative date to be specified. Example: We have a custom date field and there is no way to search for something like 'select bug_id, cf_assignee_goal from bugs where cf_assignee_goal < Now();'
Assignee | ||
Comment 17•15 years ago
|
||
This is a real easy fix using SqlifyDate in the Search. Tested on tip.
Assignee: mlewissmith → ghendricks
Attachment #210418 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #410349 -
Flags: review?(LpSolit)
Updated•15 years ago
|
Attachment #410349 -
Flags: review?(LpSolit) → review-
Comment 18•15 years ago
|
||
Comment on attachment 410349 [details] [diff] [review] Tip Works fine, but you have to fix the UI to mention (YYYY-MM-DD or relative dates) instead of the current (YYYY-MM-DD). r=LpSolit if you fix that.
Updated•15 years ago
|
Target Milestone: Bugzilla 4.0 → Bugzilla 3.6
Assignee | ||
Comment 19•15 years ago
|
||
Attachment #410349 -
Attachment is obsolete: true
Attachment #411222 -
Flags: review?(LpSolit)
Updated•15 years ago
|
Attachment #411222 -
Flags: review?(LpSolit) → review+
Comment 20•15 years ago
|
||
Comment on attachment 411222 [details] [diff] [review] Tip - V2 r=LpSolit
Updated•15 years ago
|
Flags: approval+
Assignee | ||
Comment 21•15 years ago
|
||
Checking in Bugzilla/Search.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v <-- Search.pm new revision: 1.177; previous revision: 1.176 done Checking in template/en/default/search/form.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/search/form.html.tmpl,v <-- form.html.tmpl new revision: 1.61; previous revision: 1.60
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•