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

notification on ticket close

I'd like to send an e-mail when a ticket is closed (or its status changed).

Can someone point out where in the code this occurs?  I see previous threads that accomplish the same thing on previous versions, but on v1.10, obviously the code is in different locations.




Comments

  • This feature is already in the system?
  • @energy incorrect.  There is no close ticket email.

    @mig39 You can could change your work flow so that Agents use a canned response when closing a ticket.  Which wouldn't be automatic but would have the desired affect of sending a email to the User when a ticket is closed.
  • Thanks for your reply, ntozier.  We already do this, and it works great.

    What I want to add is part of our particular workflow -- if a status is changed, a unique e-mail address will receive an e-mail notice.  This e-mail address isn't part of the ticket or the system.  

    In the past, I just added a few lines of code to generate this e-mail to class.ticket.php, in the close() function.

    But I can't seem to find where this takes place in v1.10.  

    If someone can point me in the right direction, I can put in my couple of lines of code to generate the e-mail.


  • Ok, I think I've found it, and it suits our needs well.

    In class.ticket.php, the function is setStatus.  I've put a few lines of code in there to send the appropriate e-mail, and it's working just fine.

    Thanks.
  • hi @mig39 Could you share how you have managed to that with us
  • In class.ticket.php, at the end of the function setStatus, I added some lines of php that send out an e-mail.

    Here's a starting point for how to send e-mail:  http://php.net/manual/en/function.mail.php

    There's probably an easy way to do it with the built-in OSTicket mail function as well, but for our internal needs, the php mail function was more than good enough.


  • You would think that a ticket close email would be default because it's stating your issue has been resolved. Right? Or am I misunderstanding this altogether? 
  • Hi,
    what have you add in class.ticket.php to notify if ticket is closed?
Sign In or Register to comment.