Skip to Content Skip to Menu

CB Auto Action: email notifications not working properly

  • denisp
  • denisp
  • OFFLINE
  • Posts: 26
  • Thanks: 3
  • Karma: 0
4 years 4 months ago #319447 by denisp
Hi Support Team,
My Scenario is CB + CB Auto Action.
CB is used to register users who must enter an essential data: the date of their certification.
This certification expires every 3 years.
Therefore CB Auto Action must check that value and the day before the expiry date it must send an email to the user to inform him that the certificate has expired.

let's take an example.
John Doe registers and enters his certificate which will expire on July 31, 2020. CB Auto Action the night between 30 and 31 checks the date and if true, send the email.

For these functions, Kyle helped me. I did some tests. Everything seemed ok. But after a month of use, the system now has something wrong because it also sends notifications to users that expire in 3 years (December 31, 2023).

Please, consider that the user never logs in because in this case CB is not used to create a community. So it is the server with a CronJob that calls the string that triggers the trigger

These are the screens










thanks in advance.
denis

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

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
4 years 4 months ago #319458 by beat
Thank you for the precise detailed description, and settings screen-dumps.

I have reviewed your settings and reproduced them on my localhost test-install, and I don't see how that can happen, unless the date is stored in the cb_scadenzaattotato CB field a non-sql-standard way ? (e.g. not as "2023-12-31").

Can you please first check the corresponding field value as stored in the field (unformatted, ideally checking in the SQL column in the #__comprofiler table) for the user that didn't trigger properly the email ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

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

  • denisp
  • denisp
  • OFFLINE
  • Posts: 26
  • Thanks: 3
  • Karma: 0
4 years 4 months ago #319473 by denisp
Hi Beat,

yes, in mysql the date format is correct.
And please, notice that the "already notified" field is also true on dates that are not correct.

thanks again

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

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
4 years 4 months ago - 4 years 4 months ago #319502 by beat
One stupid logic question: Shouldn't in your settings above the:

Code:
(expiry date) "Greater than or Equal to" (current date)
be:
Code:
(expiry date) "Less than or Equal to" (current date)

to give a true condition once the exiry date is reached ?

Or even, to send the expiration email 1 day before the real expiration date:

Code:
Operator: Less than or Equal to Value: [cb:parse function="time"][cb:date format="Y-m-d" time="-1 DAY" /][/cb:parse]

to give a true condition once the expiry date is reached ?
;-)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
Last edit: 4 years 4 months ago by beat. Reason: -1 DAY, not +1 DAY

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

Moderators: beatnantkrileon
Powered by Kunena Forum