[Support request] TAT figures in ticket queue

    • March 25, 2021 at 5:32 pm #7552
      G
      Devi1903
      Participant

      Hey Stevland

      I’ve made a few customisations to show a TAT (Turn Around Time) column for each ticket and also an Overall Average TAT for everything included in a page. This is great for me to view easily and live where we at for specific customers and jobs in terms of our TAT targets.

      I have two questions:

      • I have not noticed anything but i feel like this is likely to have a negative impact on performance, do you think there is anything that could be changed to improve on this?
      • For this to work the created date/closed date field must be a column on the queue. Is there another way i could do this which would not require this?

      All changes are in the queue-tickets.tmpl.php file. I’ve only included the code for the calculations below, i’ve also added lines for the overall TAT to appear at the top of the page and to add in a column for each ticket in the view to show TAT for that specific job.

      Added After Line 88:

      $all_tickets = clone $tickets;

      Added After Line 129

      $total_tat = 0;
      $avg_tat = 0;

      foreach( $all_tickets as $T1 ) {
      if( isset($T1['closed']) && $T1['closed']!='') {
      $diff = date_diff(date_create(date('Y-m-d', strtotime($T1['closed']))), date_create(date('Y-m-d', strtotime($T1['created']))));
      } else {
      $diff = date_diff(date_create(date('Y-m-d')), date_create(date('Y-m-d', strtotime($T1['created']))));
      }
      $total_tat+= $diff->days;

      }
      $avg_tat = $total_tat/$all_tickets->count();
      $c = sizeof($all_tickets);

    • March 31, 2021 at 4:32 pm #7572
      stevland
      Keymaster

      Hi @Devi1903,

      Perhaps someone else will jump in with ideas. But, speaking for myself, this is beyond the scope of what I have time to think about.

      Keep in mind, however, there there is nothing osTicket Awesome specific about your questions.

      In other words, you could post the same questions in the osTicket / Modifications forum and at least 100x more users will see them.

      Just remember to press SHIFT + O to display the ticket queue in vanilla osTicket before making screenshots. 😉

      (Oops. On second thought, you would have to apply the same modifications to osta/old/include/staff/templates/queue-tickets.tmpl.php, but it might be worth the effort to do so).

You must be logged in to reply to this topic.