[42811] Do not display a date picker on non date operators in cost query #17016
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket
https://community.openproject.org/wp/42811
What are you trying to accomplish?
On operators for date related filters but that themselves don't take a date as a value, display a field that is not date picker powered. In the context of the cost queries, the operator in question is the "during the last days" operator.
What approach did you choose and why?
Render an additional field that gets displayed and activated in case the operator is chosen. This is in line with the current implementation of the filter js which hides/shows values based on the arity of the operator. At the same time it, stretches the implementation to the limit of what it can hold. There is now a mix in here based on arity and type where the type is currently only used for the one operator.
Merge checklist