Contribution Date
Technology
Contribution Project
Contribution Details
I would like to report this issue. following are the details:
Users have a specific 'role' and a date field attached which specifies when that role should be withdrawn from that user.
If I try to create a rule to pull up all users whose 'date' is 'today', the rule doesnt work. However, if i add a simple text field and try the same rule with that text field, it seems to work.
Here is an export of both the rules:
(rule based on the date field)
{ "rules_disable_user_on_subscription_expiration_date_" : {
"LABEL" : "disable user on subscription expiration (date)",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "cron" : [] },
"DO" : [
{ "entity_query" : {
"USING" : {
"type" : "user",
"property" : "field_test",
"value" : "today",
"limit" : "50"
},
"PROVIDE" : { "entity_fetched" : { "entity_fetched" : "Fetched entity" } }
}
},
{ "LOOP" : {
"USING" : { "list" : [ "entity-fetched" ] },
"ITEM" : { "list_item" : "Current list item" },
"DO" : [
{ "user_remove_role" : { "account" : [ "list-item" ], "roles" : { "value" : { "3" : "3" } } } }
]
}
}
]
}
}
(rule based on the text field)
{ "rules_disable_user_on_subscription_expiration" : {
"LABEL" : "disable user on subscription expiration",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "cron" : [] },
"DO" : [
{ "entity_query" : {
"USING" : {
"type" : "user",
"property" : "field_text_label",
"value" : "alan",
"limit" : "50"
},
"PROVIDE" : { "entity_fetched" : { "entity_fetched" : "Fetched entity" } }
}
},
{ "LOOP" : {
"USING" : { "list" : [ "entity-fetched" ] },
"ITEM" : { "list_item" : "Current list item" },
"DO" : [
{ "user_remove_role" : { "account" : [ "list-item" ], "roles" : { "value" : { "3" : "3" } } } }
]
}
}
]
}
}
Contribution Issue Link
Contribution Link
Files count
0
Patches count
0