relative search on datetime type custom fields against "now" don't account hours, mins and secs

RESOLVED DUPLICATE of bug 978635

Status

()

RESOLVED DUPLICATE of bug 978635
4 years ago
4 years ago

People

(Reporter: fezeev, Unassigned)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Build ID: 20130511120803

Steps to reproduce:

1. add new custom field with type of datetime
2. file a bug, fill this field with a value of today data and some time (but time must be less, than now)
3. run an advanced search of bugs, that have value in new custom field less or equal than "now" (this capability was added from Bug 533878)


Actual results:

A bug from step 2 will not be included in search result


Expected results:

A bug from step 2 should be included in search result
(Reporter)

Updated

4 years ago
Component: Bugzilla-General → Query/Bug List
(Reporter)

Comment 1

4 years ago
Created attachment 8532945 [details] [diff] [review]
1108405.diff

suggested patch
Attachment #8532945 - Flags: review?(gerv)

Comment 2

4 years ago
This change is in contradiction with bug 217029 comment 5. Are you sure this won't regress anything?
(Reporter)

Comment 3

4 years ago
Created attachment 8533021 [details] [diff] [review]
1108405_2.diff

Good point, thank you, Frédéric.
So, there is another patch, that changes only 'now' behavior, not touching empty strings.

If we want to be absolutely sure for backward compatibility, we may add another relative expression, 'datetimenow' for example, that will return 'now' in date time format.

Or, at the second look at SqlifyDate sub, I can use -0y, -0m or -0h relative dates, they works fine (in contrast with -0d, from which I was started and confused), so this bug may be marked as wontwix anyway.
Attachment #8532945 - Attachment is obsolete: true
Attachment #8532945 - Flags: review?(gerv)
Attachment #8533021 - Flags: review?(gerv)

Updated

4 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 978635

Updated

4 years ago
Attachment #8533021 - Flags: review?(gerv)
You need to log in before you can comment on or make changes to this bug.