Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Auto-email upon auto-assign

Hello, everyone.  I've recently taken over as manager of my company's IT and this is hot button that I'd like to get fixed quickly.  I have very little experience with the nuts and bolts of the software, so I'm hoping someone can help me out.

We use some simple logic in the class.ticket.php file to auto-assign tickets to users based on a simple on-call rotation. We make this code change manually every couple of weeks.  Here it is so you can see how simple it is:

// Automatically assign all network tickets to: Josh's ID is 14 and Mike ID is 49
if ($deptId=='1')
$sql.=',staff_id=14';
// Automatically assign all software tickets to: Rob is 11  Phil is 13  Sam is 16 Katy is 47
if ($deptId=='3')
$sql.=',staff_id=13';

So, this all works great.  My question is, and I can't find how to get the system to do this exact thing in the admin panel, I then want to email that individual that a new ticket has been assigned to them. Neither the "New Ticket Alert" or the "Ticket Assignment Alert" functions in Adrmin Panel allow or work to provide this functionality.  Does anyone has some PHP code that I can insert of can anyone give me some guidance on how to accomplish what I'm looking to do?

Thanks, and if I'm not clear on something, please let me know and I will try to elaborate.

Regards,

Mike

IT Operations Manager

Tagged:

Comments

  • Quick note - We are on v1.9.1
  • Hi Mike,

    first 1.9.1 is a bit dated, you shall consider an upgrade to 1.9.12.
    I wrote here about how to upgrade to the latest version:

    Apart from that, meanwhile a 3rd party developers wrote a plugin to have such a feature - I have not tested the plugins itself, but it's maybe easier (and upgrade-safer) to use that as to modify the source and include some custom lines of code. Note also that you (or the member(s) of your IT how is doing this) should make a backup before trying this - as stated in the osTicket upgrade howto under point 1 ;)

    Btw. here's the link to the plugin: 

    Cheers,
    Michael
  • Michael - Thanks so much for your response.  I'll take a look at the plug-in and see if it does what we need.  I'll also look at installing the upgrade.  I've got a lot to take care of since taking over!

    Regards.

    Mike

  • Mvanover,

    Did you ever find a fix to this issue? I am looking for a similar solution and tried using the spreader plugin.  The problem I found, is that no ticket assignment alerts are generated when using the plugin.

    I was curious to see how you made out.

    Thanks,

    Tim

  • edited May 2016
    It's likely that your not assigning them, just setting the database value.. instead you'd need to load a ticket object and call the assign method, this will trigger the notifications.
    Oh, you're doing it in class ticket, then just use $this->assignToStaff($id, "Auto assigning network tickets", true);

    You can write whatever note you want, and the true is for notifications, so setting false will prevent them.
Sign In or Register to comment.