Closed
Bug 978635
Opened 10 years ago
Closed 10 years ago
'now' is interpreted as midnight for searches
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 6.0
People
(Reporter: mail, Assigned: fezeev)
References
Details
(Keywords: relnote)
Attachments
(1 file, 1 obsolete file)
917 bytes,
patch
|
gerv
:
review+
|
Details | Diff | Splinter Review |
Starting with bug 737436, a custom search with the change value of 'now' is interpreted as been at midnight this morning, as opposed to now, which is what most people would expect. For example, if I do a custom search on 'Assignee' 'changed before' 'now' (the string now) the resulting SQL is (taken from brc): LEFT JOIN bugs_activity AS act_41_3 ON bugs.bug_id = act_41_3.bug_id AND act_41_3.fieldid = 41 AND act_41_3.bug_when <= '2014-03-03 00:00:00' Surely 'now' should mean now, and not midnight for non-deadline values. Of course the danger in changing it in a release is that it might break queries which assume 'now' means midnight.
Comment 1•10 years ago
|
||
This is not a regression and this has nothing to do with bug 737436. "Now" is supported in boolean charts since Bugzilla 3.6 only, and the date has always been truncated, i.e. the time part of the day has always been ignored.
Severity: normal → minor
Keywords: regression
Assignee | ||
Comment 3•10 years ago
|
||
Suggested patch (copyed from Bug 1108405)
Attachment #8533023 -
Flags: review?(gerv)
Comment 4•10 years ago
|
||
Comment on attachment 8533023 [details] [diff] [review] 1108405_2.diff Review of attachment 8533023 [details] [diff] [review]: ----------------------------------------------------------------- r=gerv. "now" means now. Gerv ::: Bugzilla/Search.pm @@ +2214,5 @@ > + if (lc($str) eq 'now') { > + my ($sec, $min, $hour, $mday, $month, $year, $wday) = localtime(time()); > + return sprintf("%4d-%02d-%02d %02d:%02d:%02d", $year+1900, $month+1, $mday, $hour, $min, $sec); > + } > + Remove trailing whitespace on this line.
Attachment #8533023 -
Flags: review?(gerv) → review+
Updated•10 years ago
|
Flags: approval?
Updated•10 years ago
|
Target Milestone: --- → Bugzilla 6.0
Assignee | ||
Comment 5•10 years ago
|
||
previous patch without trailing space
Attachment #8533023 -
Attachment is obsolete: true
Attachment #8534418 -
Flags: review?(gerv)
Updated•10 years ago
|
Attachment #8534418 -
Flags: review?(gerv) → review+
Comment 6•10 years ago
|
||
(In reply to Gervase Markham [:gerv] from comment #4) > r=gerv. "now" means now. Before approving this patch, did you read and investigate my question in bug 1108405 comment 2?
Flags: needinfo?(gerv)
Comment 7•10 years ago
|
||
LpSolit: I'm not sure what you mean. The question in bug 1108405 comment 2 refers to bug 217029 comment 5 which is a patch adding a particular behaviour for "". The patch on this bug does not change the behaviour for "". If you have a concern, it would help if you stated it plainly; following it back through several bugs and trying to work out what you mean is prone to error. :-) Gerv
Flags: needinfo?(gerv)
Reporter | ||
Comment 8•10 years ago
|
||
I agree with gerv. But then I wrote this bug. 'now' should means now. It should be relnoted though in case people are currently using 'now' to mean midnight (server time). -- simon
Flags: approval? → approval+
Keywords: relnote
Updated•10 years ago
|
Assignee: query-and-buglist → fezeev
Status: NEW → ASSIGNED
Assignee | ||
Comment 9•10 years ago
|
||
I have no write access to git, so I need someone's help, who will push my patch to repo.
Reporter | ||
Comment 10•10 years ago
|
||
(In reply to Fedor Ezeev from comment #9) > I have no write access to git, so I need someone's help, who will push my > patch to repo. It will be the reviewer who will commit the patch for you. In this case that would be gerv.
Comment 11•10 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 8ab6357..f264250 master -> master Thanks for the patch, Fedor! Gerv
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•