Closed (duplicate)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Engine
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Jun 2010 at 05:47 UTC
Updated:
3 Sep 2012 at 02:49 UTC
Currently, the data comparison condition has these operators, "is greater than / is less than / is equal to / contains." With date and time data, it is more intuitive to use "is before / is after / is on."
It would also be nice to have the option to use expressions like, "+5 days" and "<=5 min." These types of expressions could be similar to how in 6.x you can optionally use regex expressions instead of a token value in the second comparison field.
See also: #348731: Condition: date/time comparison.
Comments
Comment #1
fagoThe operators are there, but I agree a more intuitive naming would make sense.
Comment #2
vkareh commentedFor #348731: Condition: date/time comparison, I created the following patch: http://drupal.org/node/348731#comment-4172958
It's for Drupal 6.x, but it should be fairly easy to port. Should we mark this as duplicate?
Comment #3
fagoDoing a separate date-specific condition makes sense to me, in particular when we have additional features like the granularity stuff. Having that, I think we don't need to improve the generic comparison for dates.
Comment #4
mitchell commentedI'm not reopening this issue because there isn't anything actionable atm, but I just want to say that #3 is confusing. @fago, I believe what you're saying is that a separate date/time condition makes sense because we can use date/time specific operators. Otherwise, would it be a good design for data_comparison to use different op names based on input1's data type?