Closed Bug 1108405 Opened 10 years ago Closed 10 years ago

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

Categories

(Bugzilla :: Query/Bug List, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 978635

People

(Reporter: fezeev, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

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
Component: Bugzilla-General → Query/Bug List
Attached patch 1108405.diff (obsolete) — Splinter Review
suggested patch
Attachment #8532945 - Flags: review?(gerv)
This change is in contradiction with bug 217029 comment 5. Are you sure this won't regress anything?
Attached patch 1108405_2.diffSplinter Review
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)
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Attachment #8533021 - Flags: review?(gerv)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: