Project:Trouble ticketing system to support Computer Network Operations
Version:6.x-3.0-rc2
Component:Code
Category:support request
Priority:normal
Assigned:mr.york
Status:closed (fixed)

Issue Summary

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

#1

Component:Miscellaneous» Code
Assigned to:Anonymous» 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.

#2

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.

#3

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?

#4

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 :)

AttachmentSize
queue-notification.patch 9.03 KB
queue_notification.sql_.txt 147 bytes

#5

Assigned to: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.

#6

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.

#7

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

#8

Status:reviewed & tested by the community» closed (fixed)
nobody click here