Support

Akeeba Ticket System

#32197 Change autoclose inactive ticket e-mail text

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Ticket System version
n/a

Latest post by on Sunday, 02 February 2020 17:17 CST

bindcommerce
From the last update, ATS starts to send to users and administrators an e-mail when ATS closes inactive ticket.

This is good, but in my case these e-mails are are empty (without Subject and with only a text "!-!- Please reply above this line {ticketid:123455} -!-!" in the body.

How can I customize these e-mails?

Thank you

nicholas
Akeeba Staff
Manager
The ats-autoclose-tickets.php CLI script which automatically closes tickets has been present since before version 1.0.0 was officially released in 2013. I actually implemented this script back in 2011 when ATS was only used internally on our site when the ticket component we were previously using was discontinued by its developer.

There are two ways to close a ticket: verbose or silent. By default tickets older than 30 days are closed verbosely and tickets older than 60 days are closed silently. You can control it in the component Options page.

When the CLI script closes a ticket verbosely it will also publish a post by the pseudo-user "system" noting that the inactive ticket is being automatically closed. As long as the ATS email plugin is enabled this will send emails to all participants of the ticket per their email settings and the category settings.

When a ticket is closed silently it will, indeed, cause an email to be sent because a change in the ticket status has been detected. This cannot change but it should also not be a problem; this is meant to be done once, i.e. the first time you schedule the ats-autoclose-tickets.php script to run. The idea here is to disable the email plugin, let the autoclose script close the arguably ancient tickets and then re-enable the email plugin. You are also supposed to have a silent close time limit higher than the verbose close time limit in the Options page.

That is to say, emails didn't just start being sent since last version – they have been sent since ATS' inception back in 2011. Most likely you were either not using the auto-close CLI script until now. Since it's the first time you ran it, yes, it makes sense that ancient tickets get an automatic email with no content. This is really an edge case that doesn't warrant spending any time on addressing. Case in point, you're the first person in seven years to report this issue.

As for the message posted to the ticket by the "system" pseudo-user, what you receive by email when a ticket is closed verbosely, it is defined in the language file under the COM_ATS_CLI_CLOSEPOSTMSG key. Unfortunately Joomla does not provide a method for overriding the language files in CLI scripts so you'll have to use the default message.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

bindcommerce
Hi Nicholas,
thank you for your answer. I understand the history of this function, but really I don't understand how can I customize the e-mail text.

Where I can find the standard model of these e-mails?

Why "Since it's the first time you ran it, yes, it makes sense that ancient tickets get an automatic email with no content."

Thank you

nicholas
Akeeba Staff
Manager
You can't customize the text. As I said:

As for the message posted to the ticket by the "system" pseudo-user, what you receive by email when a ticket is closed verbosely, it is defined in the language file under the COM_ATS_CLI_CLOSEPOSTMSG key. Unfortunately Joomla does not provide a method for overriding the language files in CLI scripts so you'll have to use the default message.


The e-mails sent are not special. As I said, it's the same email you get when someone posts a reply to a ticket. What triggers the email is NOT the ticket being closed, it's the special post added to the ticket saying that the ticket is closed. That's what triggers the email.

Why "Since it's the first time you ran it, yes, it makes sense that ancient tickets get an automatic email with no content."


You had very old open tickets.

You ran the script.

These old tickets got closed silently, i.e. without anything being posted to them.

When that happens the ticket changes state, i.e. it's not the same as it was before.

This causes the email plugin to trigger.

However, there is nothing to be sent.

So a blank email is sent.

This ONLY happens the FIRST time you run the script and ONLY when you have very old open tickets. Therefore it's a waste of my time adding a special check for that when you can avoid these emails by simply unpublishing the email plugin before running the script for the first time and publishing it again after you're done.

As I said, this only happens ONCE.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!