Is there a way to have the "Ticket Status" be a column on Agent view in version 1.10?http://forum.osticket.com/d/discussion//a-better-ticket-list

It appears that you linked the thread that I was going to point you to. :)

I read that whole thread and can't make heads or tails of how to do this in 1.10

9 days later

So things changed a little bit with v1.10, and I just re-learned how to do this.  Step 1Starting at Line 476 of ./includes/staff/tickets.inc.php:Changeif ($search && !$status)  unset($queue_columns);else  unset($queue_columns);Toif ($search && !$status)  unset($queue_columns);if(!strcasecmp($status,'closed'))  unset($queue_columns);Why?Originally, the system is going to only display the priority or the status, not both.  The status will only show up if there is a search.  In the change, I made it look at two different events.  Priority will show as expected, but the status will show only when looking at open tickets.  If you always want to see the status (including when looking at closed tickets), delete the second if statement altogether.Step 2We need to add the column data for the <td>s.  You should notice that the status field appears between the From and Priority fields.  This is where we will need to put the output for the status.Starting at Line 582 of ./includes/staff/tickets.inc.phpChangeif($search && !$status){  $displaystatus=TicketStatus:($T, 'value', $T);  if(!strcasecmp($T,'open'))    $displaystatus="<b>$displaystatus</b>";    echo "<td>$displaystatus</td>";  } else { ?>    <td class="nohover" align="center"      style="background-color:<?php echo $T; ?>;">      <?php echo $T; ?></td>  <?php  }To$displaystatus=TicketStatus:($T, 'value', $T);if($search && !$status){  if(!strcasecmp($T,'open'))    $displaystatus="<b>$displaystatus</b>";  }  if(strcasecmp($status,'closed'))    echo "<td>$displaystatus</td>";?><td class="nohover" align="center"  style="background-color:<?php echo $T; ?>;">  <?php echo $T; ?></td>Why?I separated out the if statements so that the status would display so long as the status was not set to closed.  If you always want to see the status, just remove the if(strcasecmp($status,'closed')) statement and you will always see that column.

3 months later

Thank you rowlandan25!It works perfectly, I just added to line 607(number after the addition of your modifications):<td colspan="8"> instead of 7.It did not change the functionality, but it kept the previous appearance.

7 months later

Thanks so much for posting this!! I have a quick question. I am doing a "test" upgrade on the system, and after adding the code, I noticed the top section still is off a bit from the tickets portion (on the right side). Did this happen to you too, and if so, did you have a fix for that? Just curious if you knew before I started messing with stuff. (picture attached)Dustin

helpdeks.JPG

Disregard my last post... the page wasn't updating the change, came back from lunch and saw it working correctly...Dustin

5 days later

Thanks rowlandan25 for a easy mod something that should have been included several releases ago..I applied the mod, but have the following display bug (attached).. any ideas?Thanx!

Screenshot_2.jpg

3 months later

HiI have tried to apply these changes but when i apply the 2nd change my ticket list does not appear at all. Any chance i could get example of a working tickets.inc.php file?

2 months later
12 days later

If you have the bug where you get alot of the "<?" Tags just remove this tag after this line: <?php echo $T; ?></td>

I received an alert regarding the above suggestion. (I'm not sure why they didn't post this them self)Their comment was:"Potentially dangerous suggestion which does not make any sense whatsoever, but can and probably will break someones source files, making them create more tickets."

I dont get it, why should this be dangerous? the php tag at this line is not used otherwise it wouldnt be displayed? or am i wrong with this assumption? And what did they mean with "making them create more tickets" ?

I cannot comment as to the intent of what the person said.  I simply copied ans pasted what they said to here.

Write a Reply...