0

I am trying to create a Civi rule that will be triggered by "Membership is changed" and then set the end date of this membership to a new value. (This rule is needed as a workaround for another bug in how CiviSepa interacts with one-time membership contributions.)

When I create an Action for this rule, I select "Update Date Value", as this seems to be the action most close to what I need (modify end date). I get redirected to a page asking for "Source Field", "Target Field", "Operation" and "Operand". When I click on the down-arrow on the right side of "Source Field" and "Target Field", no drop-down menue is opening. Instead, only a grey line appears when I click, and disappears when I click again. The same happens when I select the action "Advanced Update Date Value".

Does anybody know what could be the problem here? I get no error whatsoever. The rule has no Conditions and no Delay-Action, it contains nothing but a name and a trigger.

Edit: I tested this on a CiviCRM demo page running the version 5.62.0. In this demo system, I was able to add a Rule with the trigger "Membership is changed" and the action "Update Date Value". I was able to choose "Start Date" in "Source Field" and "End Date" in "Target Field".

2
  • I'm afraid I do not have an answer for you, but I can confirm the behaviour on Civi 5.61 on WordPress. I tried adding a condition, but it made no difference. There don't seem to be any other logical choices for what you are looking for. CiviRule is sometimes a bit arcane, so I may be missing something.
    – kapn
    Jun 20 at 15:23
  • Your "Edit" suggests this is now working on Demo? If so you may just need to upgrade or wait on the next release - or add an Answer yourself to say 'this is now fixed'
    – petednz - fuzion
    Jul 25 at 21:53

1 Answer 1

1

Membership dates are stored as SQL DATE types, for historic reasons, and most other dates in CiviCRM are stored as an SQL DATETIME. I suspect CiviRules doesn't support DATE, only DATETIME.

So if I'm correct, to fix this, someone would either need to update CiviRules to support DATE or update CiviCRM to use DATETIME for memberships (which probably should be done anyways).

1
  • I checked the date format on the demo system (demo.circle-interactive.co.uk) and here, Membership is also using date values instead of datetime (checked via API). So this cannot be the (only?) problem here.
    – emma
    Aug 2 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.