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');
}