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

"Age of Tickets" column in agent ticket view

Hi,
I have been trying to implement a column that displays the age of the ticket in minutes, hours and days, with the colour changing at preset intervals. I have tried to follow this guide from @scottro , but it is for a much older version than mine (v1.9.8.1), so the php and references are outdated.

Has anyone had any success with something like this? Can you point me in the right direction?
I know that you guys plan on integrating custom columns in a future release, but I'd like to get something makeshift up in the mean time.

Thanks a bunch! 

Ps. osTicket is awesome!

Comments

  • Thanks, I'll take a look!

    Sam
  • Hi,
    I am not trying to hijack a thread , merely making sure I am not referred to the above links, which have helped a lot,
    Osticket Version v1.9.6
    MySql   
    Version 5.5.54
    In "tickets.inc.php" I have made progress using  "strtotime" but I get an error with "effective_date" it is not returning the correct value.
    Basically  this is what I have done so far
    around line 250 I have added


    $sqldate = ('effective_date');                                    
    $newdate = date('Y-m-d',strtotime($sqldate));
    echo $newdate;

    $sqldate2 = ('today UTC');
    $newdate2 = date('Y-m-d',strtotime($sqldate2));
    echo $newdate2;

    $timeopen  = (strtotime($newdate))     ;
    $age_date  = (strtotime($newdate2))   ;

    Then around line 500 (this is dynamic as i have a lot of construction text at present )  I simply subtracted them.

    <td align="center" nowrap><?php echo ((($age_date) - ($timeopen ))/ 86400  ) ; ?></td>

    The idea works if American dates are input  as in example  " 2010-01-25 " and I get Ticket Age in days
    I suspect the problem may be in mpdf.php ( read somewhere to go look ) and I found this line

    $CreationDate = date('Y-m-d\TH:i:s').$offset;    // 2006-03-10T10:47:26-05:00 2006-06-19T09:05:17Z
     
    Can anybody help in moving this forward ?

    All help will be MOST graciously appreciated

    thanks
    Andy

  • You really should start your own thread rather than resurrecting a zombie one from 2015.

This discussion has been closed.