Problem/Motivation
Currently, the code for the data_calc action disables only the * and / operation when provided with a date parameter for input1, but the comments seem to point to the fact that the min and max operations should be disabled as well.
Proposed resolution
Either disable the min and max operations or add logic to the action to correctly handle the min and max operations for dates.
My preference would be to add the logic, as there are valid use cases where one would want to compare two dates. We have resorted to writing our own action for those use cases, but having that functionality in rules_core would be even better.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2527664-2-data-calc.patch | 474 bytes | tr |
Comments
Comment #1
tr commentedYes, this should have been fixed long ago. Here's a patch to remove the options, consistent with what the code comment says should happen. I agree it would be nice to implement that functionality for dates, but as a feature that is something that needs to be done in Drupal 8 at this point. And obviously there's not a lot of demand for this ...
Comment #3
tr commentedCommitted.