Page 1 of 1
show creation date of ticket in admin main page
Posted: Fri May 18, 2012 10:04 am
by notzen
Hi,
I try to search if there is an option to add the field that show when the ticket was created but unfortunately i do not find it.
I suppose there is to add some code to do it, anyone could give some help or direction about how to do that?
thanks a lot for any reply
Re: show creation date of ticket in admin main page
Posted: Fri May 18, 2012 3:59 pm
by steve
Where do you want to add this?
Re: show creation date of ticket in admin main page
Posted: Tue May 22, 2012 9:49 pm
by notzen
Hi,
I just wish to show it in the main page where you see all the tickets . It is possible to do that?
Re: show creation date of ticket in admin main page
Posted: Wed May 23, 2012 4:03 am
by steve
The following will change the admin page ticket list to show the date the ticket was created instead of the date it was last updated.
open inc/ticket_list.inc.php
Find (Around 338)
Code: Select all
<td class="$color">$ticket[lastchange]</td>
Change it to
Code: Select all
<td class="$color">$ticket[dt]</td>
Also find (Around 429)
Code: Select all
<th class="admin_white" style="text-align:left; white-space:nowrap;"><a href="<?php echo $href . '?' . $query . $sort_possible['lastchange'] . '&sort='; ?>lastchange"><?php echo $hesklang['last_update']; ?></a></th>
Change it to
Code: Select all
<th class="admin_white" style="text-align:left; white-space:nowrap;"><a href="<?php echo $href . '?' . $query . $sort_possible['dt'] . '&sort='; ?>dt"><?php echo $hesklang['created_on']; ?></a></th>
Re: show creation date of ticket in admin main page
Posted: Wed May 23, 2012 1:02 pm
by notzen
Hi,
thanks a lot!!!
this modification will be really usefull!
but is there a way to show both last updated colum and date created ?
i need both the colums , sorry.
Re: show creation date of ticket in admin main page
Posted: Wed May 23, 2012 2:33 pm
by steve
Instead of replacing the lines above, add the "change to" lines. Just make sure the added lines are in the same order in both the header and body of the list.
Re: show creation date of ticket in admin main page
Posted: Tue Jun 05, 2012 1:44 pm
by notzen
thank a lot for your help!
thanks !!
Re: show creation date of ticket in admin main page
Posted: Wed Jun 06, 2012 8:59 am
by notzen
hi,
I notice that the date format is Y-m-D , is there a way to show date in d-m-Y format ? , i see that the new field does not show the date format as configured in my settings?
Re: show creation date of ticket in admin main page
Posted: Wed Jun 06, 2012 4:24 pm
by steve
Try this
Open inc/ticket_list.inc.php
find (around line 316)
Code: Select all
$ticket['lastchange']=hesk_time_since(strtotime($ticket['lastchange']));
Paste this just below
Code: Select all
$ticket['dt']=hesk_formatDate($ticket['dt']);
Re: show creation date of ticket in admin main page
Posted: Tue Jun 25, 2013 2:13 pm
by akwil
Dear Steve, Notzen.
Your answers helped me a lot.
I have 2 questions about it.
1. When i put $ticket['dt']=hesk_formatDate($ticket['dt']); it wraped the date (time is under the date). Can i somehow change it to be in one row?
2. How to change the lastreplier field to OWNER. I need to see who is the owner of the ticket.
I have followed your steps but it only gave me numbers insted of names of staff members...
Please help,
Artur
Re: show creation date of ticket in admin main page
Posted: Thu Jul 04, 2013 5:05 pm
by bastiaan.c
Hi I have updated to 2.5 and pastet $ticket['dt']=hesk_formatDate($ticket['dt']); into the file inc/ticket_list.inc.php but suddenly is does not work anymore.
Please help
Thanks
Re: show creation date of ticket in admin main page
Posted: Thu Jul 04, 2013 8:35 pm
by bastiaan.c
Hi Artur,
I think if you adjust the width in the css style sheet, I think that it will be wide enough that it will stay in 1 row.

Re: show creation date of ticket in admin main page
Posted: Fri Jul 05, 2013 5:07 am
by steve
^^^^^
+1