Hi,
I'm currently testing osTicket and what I'm missing are Feedback and InProgress states. I'm expecting to change the Open (or New) state to Feedback when an agent is answering a ticket, and it gets back to InProgress when the customer replies. Pretty common for a ticket system so that you can see where you need to do something and where we are simply waiting for customer feedback.
I found the option to add new states as sub-states of Open and I tried to use filters to achieve what I want, but I was not able to get the filter working. Maybe somebody can give me some hints here.
Question 1) the tooltip says "Choose the target Channel for your ticket Filter. The Channel is the source through which the ticket arrived into the system. " Does this mean the filter only works in ticket creation? Or also on replies?
Question 2) What is the filter criteria? The is nothing like "ticket reply", but different mail header fields are available. So I simple tried "To/CC" with "contains"="osticket@mydomain.com" which should match any mail to the ticket system. As action I configured a state change to InProgress, but this did not work.

Question 3) Is there a way to trace/debug a filter?

Any help is appreciated.

  • KevinTheJedi and wr3ck3tt replied to this.
  • gergap

    1. Filters only trigger on ticket creation.
    2. Filter Criteria is pretty self explanatory. It’s criteria that tickets must match in order to apply the Action(s). Oh and the "Adressee (To and CC)" criteria does not match system emails. To match system emails set the Target to "Emails" or to a specific system email.
    3. Not really, you simply look at the Criteria and compare with the ticket.

    You can set a Ticket to a Status of a Closed state and when a User replies it will reopen the ticket to a status of an Open state. However the system will not automatically change a status from an Open state to another Open state; that would have to be done manually.

    Cheers.

    gergap

    1. Filters only trigger on ticket creation.
    2. Filter Criteria is pretty self explanatory. It’s criteria that tickets must match in order to apply the Action(s). Oh and the "Adressee (To and CC)" criteria does not match system emails. To match system emails set the Target to "Emails" or to a specific system email.
    3. Not really, you simply look at the Criteria and compare with the ticket.

    You can set a Ticket to a Status of a Closed state and when a User replies it will reopen the ticket to a status of an Open state. However the system will not automatically change a status from an Open state to another Open state; that would have to be done manually.

    Cheers.

    So the idea with osTicket is to close a ticket after reply and wait for reopen?

      gergap

      The idea is do what works best for you. Some people leave them open (if awaiting user response) and some people close them to get them out of the Open Queue and some people set to a separate Open status and manually update it after User replies, etc.

      Cheers.

      If found it quiet easy to change the default behavior of the "Post Reply" form to autoselect 'Feedback'. This is a HTML only change and does not affect the rest of the app logic.

      diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php
      index 47e7728e..eabb599e 100644
      --- a/include/staff/ticket-view.inc.php
      +++ b/include/staff/ticket-view.inc.php
      @@ -1106,12 +1106,13 @@ if ($errors['err'] && isset($_POST['a'])) {
                               foreach (TicketStatusList::getStatuses(
                                           array('states' => $states)) as $s) {
                                   if (!$s->isEnabled()) continue;
      -                            $selected = $statusId == $s->getId();
      +                            $current = ($statusId == $s->getId());
      +                            $selected = ($s->getName() == 'Feedback');
                                   echo sprintf('<option value="%d" %s>%s%s</option>',
                                           $s->getId(),
                                           $selected ? 'selected="selected"' : '',
                                           __($s->getName()),
      -                                    $selected ? (' ('.__('current').')') : ''
      +                                    $current ? (' ('.__('current').')') : ''
                                           );
                               }
                               ?>

      Then I tried to edit also class.ticket.php to change back the ticket status to 'InProgress' when a user replies,
      but this didn't work. It looks like the onMessage handler is not called in this case, so I still lack some understanding of the code. The code is pretty easy to read, actually, but here I have need to investigate further. Maybe you have a tip.

      diff --git a/include/class.ticket.php b/include/class.ticket.php
      index 593df7d8..aba3b4fa 100644
      --- a/include/class.ticket.php
      +++ b/include/class.ticket.php
      @@ -228,6 +228,10 @@ implements RestrictedAccess, Threadable, Searchable {
                return $this->hasState('closed');
           }
       
      +    function isFeedback() {
      +         return $this->hasState('Feedback');
      +    }
      +
           function isCloseable() {
               global $cfg;
       
      @@ -1445,6 +1449,13 @@ implements RestrictedAccess, Threadable, Searchable {
               return $status ? $this->setStatus($status) : false;
           }
       
      +    function changeToInProgress() {
      +        if (!$this->isFeedback())
      +            return false;
      +
      +        return $this->setStatus('In Progress');
      +    }
      +
           function onNewTicket($message, $autorespond=true, $alertstaff=true) {
               global $cfg;
       
      @@ -1694,6 +1705,12 @@ implements RestrictedAccess, Threadable, Searchable {
               $this->save();
       
       
      +        if ($this->isFeedback()) {
      +            $this->changeToInProgress();
      +            $this->save();
      +            return;
      +        }
      +
               // Reopen if closed AND reopenable
               // We're also checking autorespond flag because we don't want to
               // reopen closed tickets on auto-reply from end user. This is not to
      -- 

        gergap

        I cannot assist with customizations as you are deviating from core. When modifying the codebase you are always on your own and will always proceed at your own risk.

        Cheers.

        a month later

        gergap Pretty common for a ticket system so that you can see where you need to do something and where we are simply waiting for customer feedback.

        Hello gergap, if what you need is to identify which tickets need attention (InProgress) and which tickets have already been answered and are awaiting the customer's response (Feedback), you can possibly solve it more easily: use the filter in the tickets queue:

        "Open" = Open/Open = InProgress (last message by customer)
        "Respondidos" = Open/Answered = Feedback (last message by agent)

        Take a look at /scp/settings.php?t=tickets#queues you can customize as much as you need

        In my case, sometimes I prefer to change the status of the ticket when replying and leave it as Solved. If the customer responds then the ticket is reopened. If the customer do not respond, no further action is required.
        But other times I want to respond and leave the ticket visible. What I did is generate a new state that is Open/Waiting.

        BTW, the queue shows tickets "InProgress" in bold. The very simple way to know where an action is required.

        Write a Reply...