last updated field added to reports.

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
jim
Posts: 4
Joined: Thu Jun 20, 2013 10:37 pm

last updated field added to reports.

Post by jim »

Script URL:
Version of script: 2.50
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Mister klemen,
Any chance of getting some help on adding a "last updated time and date" field to the reports?
This was discussed in the 2.50 beta thread where you said it shouldn't be hard to do, but I guess it didn't make it into the final release.
Any help with this would be greatly appreciated.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: last updated field added to reports.

Post by Klemen »

I have learned from experience that after beta it is not wise to add new functionality to the final version, something is bound to break :wink:

This should do the trick, haven't tested it though:

In admin/export.php find

Code: Select all

<Cell><Data ss:Type="String">'.$hesklang['ts'].'</Data></Cell>
After this add

Code: Select all

<Cell><Data ss:Type="String">'.$hesklang['last_update'].'</Data></Cell>
Find

Code: Select all

$ticket['dt'] = date("Y-m-d\TH:i:s\.000", strtotime($ticket['dt']));
After this add

Code: Select all

$ticket['lastchange'] = date("Y-m-d\TH:i:s\.000", strtotime($ticket['lastchange']));
Find

Code: Select all

<Cell><Data ss:Type="String"><![CDATA['.$ticket['time_worked'].']]></Data></Cell>
After this add

Code: Select all

<Cell ss:StyleID="s62"><Data ss:Type="DateTime">'.$ticket['lastchange'].'</Data></Cell>
Last edited by Klemen on Thu Jul 18, 2013 1:26 pm, edited 1 time in total.
Reason: Fixed wrong variable name
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
jim
Posts: 4
Joined: Thu Jun 20, 2013 10:37 pm

Re: last updated field added to reports.

Post by jim »

Ok, assuming I inserted the code correctly. We all know how that goes since I'm an idiot.
Anyways, it appears to be correctly inserting the last worked time and date. However the header cell is not populated with anything. Did I miss something or is there another file that I need to edit?
Thank you so much for your help.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: last updated field added to reports.

Post by Klemen »

$hesklang['lastchange'] should actually be $hesklang['last_update']

I modified the original code to have the correct value.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply