Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Best way of testing if datestamp in field is '3 months old' in autoaction?

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
8 years 4 months ago - 8 years 4 months ago #283297 by fribse2011
Thankyou, now I understand it.
How would I go about testing it?

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: 8 years 4 months ago by fribse2011.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 4 months ago #283314 by krileon
Instead of doing +3 MONTHS do something like +1 DAY then check tomorrow to see if it worked. If time is available you'd be able to test by seconds, minutes, or hours.


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
8 years 3 months ago #283371 by fribse2011
I've tried it now.
I changed it to 'equal to' because I'm running the 'users' trigger every day, and that should work as I understand it.
This is one action I've created:


The line reads:
[cb:parse function="time" time="+1 DAY"][cb_trial][/cb:parse] EQUAL TO cb:parse function="time"][cb:date format="Y-m-d" /][/cb:parse]

I then set the date to yesterday in the datestamp field.
The other one I created was this one:


The line reads:
[cb:parse function="time" time="+2 DAYS"][cb_trial][/cb:parse] EQUAL TO cb:parse function="time"][cb:date format="Y-m-d" /][/cb:parse]

When I click the 'Internal Users URL' to test it, I get a page where it says all the tests it has done for the users on Action 48, but I don't see the other actions that is set to run on the Users trigger, like the ones I've just created. Is that as designed, or is something wrong? I've even disabled debug on action 48, and activated it on the others, but it still says 'action 48' for every user, and not the other ones..

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.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 3 months ago #283422 by krileon

[cb:parse function="time" time="+2 DAYS"][cb_trial][/cb:parse] EQUAL TO cb:parse function="time"][cb:date format="Y-m-d" /][/cb:parse]

This immediately shows its issue. Your condition is missing its leading bracket.

To debug an action enable debug mode and maximum error reporting in Joomla global configuration. Next under Parameters of your action enable Debug. It will tell you when a condition fails and what it tried to compare exactly.


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
8 years 3 months ago #283463 by fribse2011
Darned, you are ABSOLUTELY right, one can really stare oneself blind looking all sorts of wrong places. 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.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum