Page MenuHomePhabricator

Fix a log warning when searching for ranges on custom "Date" fields

Authored by epriestley on Feb 28 2019, 5:37 PM.




It looks like this blames to D19126, which added some more complex constraint logic but overlooked "range" constraints, which are handled separately.

Test Plan
  • Added a custom "date" field to Maniphest with "search": true.
  • Executed a range query against the field.


  • Before: Warnings about undefined indexes in the log.
  • After: No such warnings.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Feb 28 2019, 5:37 PM
epriestley requested review of this revision.Feb 28 2019, 5:38 PM
epriestley added inline comments.Feb 28 2019, 6:46 PM

This is where the other type of constraint gets built, with these values.


This is where we unpack these values from all constraint types unconditionally, then only use them for constraint types which will actually have legal values.

A more tailored patch would be to do this unpacking only after we find a constraint type which we'll examine them for, but it seems reasonable that all constraints should have the same fields available.

I cherry-picked this into our fork and it fixes the problem. ✅

amckinley accepted this revision.Mar 1 2019, 12:19 AM
This revision is now accepted and ready to land.Mar 1 2019, 12:19 AM
This revision was automatically updated to reflect the committed changes.