In one of the closed support request was mentioned queuing of tickets received via E-mail. On my system tickets posted from web goes to queue too. This is pretty good feature for accepting/rejecting tickets.

My question: Can I configure notification about new queued ticket?

Now, when user submits request, it happens absolutely silent.

Comments

roczei’s picture

Component: Miscellaneous » Code
Assigned: Unassigned » roczei

There is no mail notification feature for the queue at the moment, maybe the next release will content this. If you have a patch file for this feature then you can sent to us and we will check it.

errno’s picture

Hi, I have done reading Drupal module development documentation, it looks pretty clear. So I will write a queue notification feature, possibly it will be ready on next week.

errno’s picture

I've started development and having a progress :) But one thing gets me in doubt, I've decided to request a suggestion.

Strange (in my opinion) conditional structure presents in function _ticket_mail_header:
if ($message['id'] != 'ticket_new_assigned') {
...
} elseif ($message['id'] == 'ticket_new_assigned') {
...
}

E-mail calls generated by my code passed via first branch but gets an empty $message['to'], and as a result e-mail is not sent :(

Can I add specific branch for my case? Is it compliant with module design?

errno’s picture

StatusFileSize
new147 bytes
new9.03 KB

I have done the patch for Queue notification, it requires two additional fields in ticket_template table (simple SQL script included). Please check it and possibly commit. I will hold deploying to my production server awaiting for your verdict :)

mr.york’s picture

Assigned: roczei » mr.york
Status: Active » Reviewed & tested by the community

We are testing your patch. If it works correctly then it will be commited to the modul.
I am asking for other people to test it and give some feedback.

mr.york’s picture

I checked your patch and I made a little modification.

This SQL query was before:

<?php
function _ticket_mail_header(&$message, &$params) {
...
$SQL = "SELECT mailto, email_name FROM {ticket_email} WHERE gid = %d";
...
}
?>

and this is the new one:

<?php 
function _ticket_mail_header(&$message, &$params) {
...
$SQL = "SELECT mailto, email_name FROM {ticket_email} WHERE gid = %d AND def = 1 AND active = 1";
...
}
?>

Reason of my modification: only the default mail addresses and selected mail addresses will get reports.

errno’s picture

Fine, thanks :) I missed this, because it was my first experience with ticketing internals, and Drupal modules development at all.

mr.york’s picture

Status: Reviewed & tested by the community » Closed (fixed)