Support

Akeeba Ticket System

#42397 Have Mail Fetch honor category default priority settings

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
5.4.0
PHP version
8.4.14
Akeeba Ticket System version
5.4.1

Latest post by nicholas on Wednesday, 29 October 2025 07:31 CDT

genr8r

Greetings,

We recently switched to Akeeba Ticket System and are really enjoying it.

We want all of our tickets to default to private and have a normal priority. We have that set properly in all of our ticket categories and it is working correctly for all tickets created via the onsite form. We are also using the Mail Fetch plugin (Google Workspaces OAuth).

It looks like the plugin misses the TicketModel::processNewTicketData() when creating a new ticket.

Because we have permissions set to allow users to create private tickets and those default to "high" priority on every ticket, anything coming in via email is set to high priority regardless of the settings in the ticket category.

Am I missing something? OR can I make a feature request for the Mail Fetch plugin to honor the priority that is set in the ticket category to which it is sending tickets?

Thanks,

Brian

 

Something like the following at EmailCheck.php:1143

if ($newTicket)
{
    JLog::add('Posting a new ticket', JLog::DEBUG, 'ats.emails');

    $title = $email['subject'];

    // Get category parameters to apply default priority
    $catService = Factory::getApplication()->bootComponent('com_ats')->getCategory(['access' => false]);
    $category   = $catService->get($categoryID);
    $catParams  = $category ? new Registry($category->params) : new Registry();
    $cParams    = ComponentHelper::getParams('com_ats');
    
    // Get default priority from category settings
    $defaultPriority = $catParams->get('default_priority', '');
    $hasPriorities   = $cParams->get('ticketPriorities', 0) == 1;

    // TODO Public or private needs to take into account the category preferences as well
    $data = [
        'id'         => 0,
        'catid'      => $categoryID,
        'status'     => 'O',
        'title'      => $title,
        'public'     => $perms['ats.private'] ? 0 : 1,
        'origin'     => 'email',
        'enabled'    => 1,
        'created_by' => $user->id,
    ];
    
    // Apply category default priority if configured
    if ($hasPriorities && is_numeric($defaultPriority)) {
        $data['priority'] = (int) $defaultPriority;
        JLog::add(sprintf('Applying category default priority: %d', $data['priority']), JLog::DEBUG, 'ats.emails');
    }

nicholas
Akeeba Staff
Manager

It is a bit more complicated than that. What you are doing in that code forces the priority, it doesn't use it as a default value. An email can have its own priority: highest, high, normal, low, lowest. This should be possible to use as an override to provide the same experience to the user as the web interface.

So, what I am thinking is that when ticket priorities are enabled it should go like this:

  • Email priority Highest or High => ATS priority High
  • Email priority Normal => Default ATS category priority. If none is defined use High for private tickets and Normal for public tickets.
  • Email priority Low or Lowest => ATS priority Low

The reason I use normal email priority as an alias to the category default is that this is the default priority in mail clients. Mail clients do not allow unsetting the priority altogether.

Also note that, by default, ATS tickets sent by email are private if the user is allowed to submit private tickets. Therefore, if the user does not set their email to low or lowest priority, and you have not set your category's default priority to Normal or Low, all tickets received by email will be private with High priority.

You can download the dev release implementing this change here: https://www.akeeba.com/download/ats-dev/5-4-2-dev202510291230-reva0178294/pkg-ats-5-4-2-dev202510291230-reva0178294-pro-zip.zip 

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!

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!