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

Close ticket from E-mail

Hello all! Need help with something fairly obscure.

We are trying to be able to manage as much of the ticket handling process as possible from Email. IE: on the go from an iPhone. We can successfully create, update, and respond to tickets completely through Email.

The next thing we want to do is streamline the process by also being able to close tickets without ever having to log into the actual software. Such as simply having a link in the Email that can be clicked to tell OSticket to mark the ticket as "closed".

Any thoughts/suggestions/input?

Comments

  • how are you creating tickets on behalf of someone?

    i.e. a customer sends you a ticket, and you want to enter it in as a ticket but not send you the notifications as you created the ticket?
  • We don't. The users just send an Email. It's internal IT support at a small company. OSticket creates the ticket from the dedicated Email address.
  • It would not be that hard to add a "[ticket number] close" subject line handler. Check to see if its a staff email address then call the close ticket function with that number and staff info.
    I don't have time to work on it right now and my client doesn't use it that way but maybe someone can do it.
  • Have got a basic #close working for you.
    I will look at adding the other functions (open, assign etc) when I have time and will add them to my Staff Reply mod.

    For now, you can run close with the following (tested ok for me

    include/class.ticket.php

    diff class.ticket.orig class.ticket.php
    1405a1406,1410
    > //Check for actions in the subject
    > if($vars['subject'] && preg_match (\"/#close/\", $vars['subject'], $action)) {
    > return $this->close();
    > }
    >




    include/class.mailfetch.php (Assuming you already have current staff reply mod in place.)

    diff class.mailfetch.pre class.mailfetch.php
    417a418
    > \"subject\" => $vars['subject'],

    (Above just adds "subject" to the staffvars array to push it through with the reply to check for the #close parameter).
  • awesome.

    I'm testing out the other fixes right now.

    With this, they will need to add #close to anywhere in the subject?
  • adidasrta;38939 said:
    With this, they will need to add #close to anywhere in the subject?
    Yes, just through #close anywhere in the subject and it will close the ticket on receipt.
  • Is it possible to have it work where It can notify the end user that the ticket was closed and also include the comment (if any?)
  • adidasrta;39428 said:
    Is it possible to have it work where It can notify the end user that the ticket was closed and also include the comment (if any?)
    Changing the order allows the email to be sent. It doesn't actually state the ticket is closed, but sends your comments.

    See below change to original.


    diff class.ticket.orig class.ticket.php
    1442a1451,1455
    > }
    >
    > //Check for actions in the subject
    > if($vars['subject'] && preg_match (\"/#close/\", $vars['subject'], $action)) {
    > return $this->close();

  • I'd like to ask where to paste the code in each file ? which method ?
  • edited October 2014
    Just be aware that once you start hacking the code, you're condemned to a lifetime of maintaining the changes through every upgrade--as well as occasional breakdowns when new code is incompatible with your hacks.

    On the other hand, this is a GREAT idea for a feature request. It might look something like:
    Filter action: Modify ticket status to...(pick from list)

    @thebullfrog, I'll let you suggest it.

    Jack
  • This thread is for the 1.8.x tree not the current version.
Sign In or Register to comment.