Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] Why doesn't this rule fire?

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
9 years 11 months ago - 9 years 11 months ago #256304 by fribse2011
Replied by fribse2011 on topic Why doesn't this rule fire?
Ok, the nightly build fixed the error, so that the rules could fire as they should, and they work again, my first rule of the sequence was the field rule, so that has apparently stopped the rule processing, and thus the others didn't get executed as a consequence of that.

The reason I was thinking about the 'master' rule, was that I have two situations where I need the same three actions taken, so instead of building to times three rules, and have to maintain each change twice, I wanted to do the 'proper' programming way, and use subrutines that handled each task, and then a master routine calling them.

So to be sure, does the changes take effect between each rule, or is it only done at the end?
Let me clarify that a bit, I have three actions that is taken for a user that is no longer a member.

Rule 1: Clear all members-only info from the profile
Rule 2: Send a mail
Rule 3: Modify the Groups they belong to.

For the manual edition, the bookkeeper of the club simply modifies the membership type to 'non-member'.

For each rule I have a set of conditions I check on.
In each rule there are two triggers.
"after backend profile edit", and "after frontend profile edit".
The rules are active for each ACL group that members can be in.
Each rule has two conditions that are checked:
[var1_cb_type] not equal to [var3_cb_type]
[cb_type] is NOT REGEX /LIST OF MEMBERSHIP TYPES/

That seems to work as it should when people are manually signed out of the club.

Now the new situation that I wish to solve on 1/1-2015, the internal users trigger.
The conditions are a bit different there, as it should react on a field.
So the same rules as above.
In each rule there is one trigger
Internal Users General
The rules are active for each ACL group that members can be in.
Each rule has two conditions
[cb_udmeldt] equal to 1
[cb_type] is REGEX /list of membership types/

BUT, as the first rule clears the membership info, including the [cb_udmeldt] field, I guess the other two rules would not fire, or are the fields not 'commited' until all rules are processed? Or should I move the 'clear fields' rule to be the last of the three, and then make it work for the lower ACL group 'Registered'.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
Last edit: 9 years 11 months ago by fribse2011.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8303
  • Karma: 1446
9 years 11 months ago #256361 by krileon
Replied by krileon on topic Why doesn't this rule fire?

Ok, the nightly build fixed the error, so that the rules could fire as they should, and they work again, my first rule of the sequence was the field rule, so that has apparently stopped the rule processing, and thus the others didn't get executed as a consequence of that.

The reason I was thinking about the 'master' rule, was that I have two situations where I need the same three actions taken, so instead of building to times three rules, and have to maintain each change twice, I wanted to do the 'proper' programming way, and use subrutines that handled each task, and then a master routine calling them.

I see, I suppose then a better way would be a new action type that fires other actions. I've added a feature ticket for this.

forge.joomlapolis.com/issues/4986

BUT, as the first rule clears the membership info, including the [cb_udmeldt] field, I guess the other two rules would not fire, or are the fields not 'commited' until all rules are processed? Or should I move the 'clear fields' rule to be the last of the three, and then make it work for the lower ACL group 'Registered'.

You probably don't need the ACL check for the field action. The below is how I'd order it.

Send Email
Change Group
Clear Info

All 3 would condition as follows.

[cb_udmeldt] equal to 1
[cb_type] is REGEX /list of membership types/

All 3 would have the Access set to Everybody. The conditions in this case handle the access fine. The last action changes cb_udmeldt to 0 and that user is done being processed.

With that said yes a "master action" could be helpful in this case as you'd put access checks and conditions on your master action only. Then it'd fire 3 other actions to do the changes. I've added a feature ticket to implement a new action type to fire other actions, which should be able to help with this in next release.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: fribse2011

Please Log in or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
9 years 11 months ago #256422 by fribse2011
Replied by fribse2011 on topic Why doesn't this rule fire?
Wow, sounds great, thankyou!

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
9 years 11 months ago #256907 by fribse2011
Replied by fribse2011 on topic Why doesn't this rule fire?
I can see the new 'Action' type rule is there, excellent, can't wait to try it out :-)

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8303
  • Karma: 1446
9 years 11 months ago #256959 by krileon
Replied by krileon on topic Why doesn't this rule fire?
If you think that's great check out the new Format Functions below conditions (can be enabled for actions under Parameters). I've completely rewritten how they're used to a standard substitution usage and significantly boosted their usability. :)


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: nant

Please Log in or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
9 years 11 months ago #256994 by fribse2011
Replied by fribse2011 on topic Why doesn't this rule fire?
Wow, cool, it's very neat, very complicated, and I hope I can get my head around them :-)

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum