Page MenuHomePhabricator

Allow filtering of "date" custom fields
ClosedPublic

Authored by epriestley on Mar 23 2014, 6:36 AM.
Tags
None
Referenced Files
F14056374: D8598.diff
Sat, Nov 16, 8:17 PM
F14005549: D8598.id20425.diff
Sun, Oct 27, 3:17 PM
F14000717: D8598.id20386.diff
Thu, Oct 24, 11:59 PM
F13996890: D8598.id20425.diff
Thu, Oct 24, 12:51 AM
F13963685: D8598.id20408.diff
Oct 15 2024, 5:17 PM
F13963611: D8598.id.diff
Oct 15 2024, 4:51 PM
F13957189: D8598.id20387.diff
Oct 14 2024, 9:01 AM
Unknown Object (File)
Oct 9 2024, 3:42 PM

Details

Summary

Ref T4663. Ref T4659. Allows "date" fields to be filtered with range parameters.

Test Plan
  • Added a custom "date" field with "search".
  • Populated some values.
  • Searched for dates using new range filters.
  • Combined date search with other searches.
  • Ran other searches independently.
  • Inspected the generated queries.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Allow filtering of "date" custom fields.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.

Does this also implicitly enable sorting?

Okay. I'll try patching it in the next day or two, if it isn't landed by then.

After patching this and attempting to run a query against my custom "due date" field, I got this error:

Argument 2 passed to PhabricatorTime::parseLocalTime() must be an instance of PhabricatorUser, null given, called in /Checkout/facebook/phabricator/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php on line 116 and defined

For reference, my query attempted to use "Before Due Date" with a value of "4-1-2014".

It appears as if I was not logged in while running the query, but I was definitely logged in (my instance does not allow anonymous access).

Attempting to patch on top of D8595 gives me an empty commit error. Not sure what is going on there...

Doh, forgot that adding dependencies to diffs automatically handles the diffs. Patch works fine now, but the filters don't appear to work:

Screenshot_2014-03-23_14.04.57.png (227×348 px, 21 KB)

Screenshot_2014-03-23_14.05.05.png (231×332 px, 21 KB)

Screenshot_2014-03-23_14.05.57.png (1×873 px, 100 KB)

Nevermind, it looks like that is just crappy parsing of the date by the filter... If I use a more verbose date, it works properly:

Screenshot_2014-03-23_14.07.53.png (353×247 px, 17 KB)

btrahan edited edge metadata.
btrahan added inline comments.
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
534

s/contraint/constraint

This revision is now accepted and ready to land.Mar 25 2014, 8:09 PM
epriestley updated this revision to Diff 20425.

Closed by commit rP8e8818783599 (authored by @epriestley).

Is that search/group by custom fields works in latest release from this week?
I'm in need of that but can't see any custom field (added in Maniphest) in search query task interface.
Thanks for answers