show creation date of ticket in admin main page

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
notzen
Posts: 5
Joined: Fri May 18, 2012 9:58 am

show creation date of ticket in admin main page

Post 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
steve
Posts: 147
Joined: Tue Mar 27, 2012 9:32 pm

Re: show creation date of ticket in admin main page

Post by steve »

Where do you want to add this?
-Steve
notzen
Posts: 5
Joined: Fri May 18, 2012 9:58 am

Re: show creation date of ticket in admin main page

Post 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?
steve
Posts: 147
Joined: Tue Mar 27, 2012 9:32 pm

Re: show creation date of ticket in admin main page

Post 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>
-Steve
notzen
Posts: 5
Joined: Fri May 18, 2012 9:58 am

Re: show creation date of ticket in admin main page

Post 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.
steve
Posts: 147
Joined: Tue Mar 27, 2012 9:32 pm

Re: show creation date of ticket in admin main page

Post 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.
-Steve
notzen
Posts: 5
Joined: Fri May 18, 2012 9:58 am

Re: show creation date of ticket in admin main page

Post by notzen »

thank a lot for your help!

thanks !!
notzen
Posts: 5
Joined: Fri May 18, 2012 9:58 am

Re: show creation date of ticket in admin main page

Post 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?
steve
Posts: 147
Joined: Tue Mar 27, 2012 9:32 pm

Re: show creation date of ticket in admin main page

Post 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']);
-Steve
akwil
Posts: 24
Joined: Fri May 24, 2013 10:00 am

Re: show creation date of ticket in admin main page

Post 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
bastiaan.c
Posts: 142
Joined: Sat Jun 22, 2013 9:24 pm

Re: show creation date of ticket in admin main page

Post 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
bastiaan.c
Posts: 142
Joined: Sat Jun 22, 2013 9:24 pm

Re: show creation date of ticket in admin main page

Post 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. :?
steve
Posts: 147
Joined: Tue Mar 27, 2012 9:32 pm

Re: show creation date of ticket in admin main page

Post by steve »

^^^^^
+1
-Steve
Post Reply