Page 1 of 1

last updated field added to reports.

Posted: Tue Jul 16, 2013 8:38 pm
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.

Re: last updated field added to reports.

Posted: Wed Jul 17, 2013 1:17 pm
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>

Re: last updated field added to reports.

Posted: Wed Jul 17, 2013 7:51 pm
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.

Re: last updated field added to reports.

Posted: Thu Jul 18, 2013 1:25 pm
by Klemen
$hesklang['lastchange'] should actually be $hesklang['last_update']

I modified the original code to have the correct value.