Page 1 of 1

Custom Fields in the Admin Tickets Table

Posted: Wed Nov 04, 2009 11:18 am
by mtwelve
Script URL: Hosted Internally; No External Access
Version of script: 2.1

-----

Hi,

Because I'm having trouble getting HESK/PHP to send emails on our setup I have been looking at another way to make it usable for our enviroment.

It involves allowing staff members to log in to view the tickets they and everyone else has submitted.

I have added some custom columns to the table in the admin page by following these instructions: viewtopic.php?t=745


They have worked great however it would be brilliant if I could add one of our Custom Fields.

The information regarding these fields is kept in hesk_settings_inc.php.


I've managed to make the column list the word [Array] which I know it is retrieving from hesk_settings_inc.php

But I have no knowledge of PHP and getting it to acually list what has been selected in the Custom Field is waaaay beyond me.


If someone could help me or point me in the right direction I would be eternally grateful.


Thanks

Posted: Wed Nov 04, 2009 4:39 pm
by Klemen
You can try adding an extra column to the table, similarly like in the post you mentioned:

In the print_tickets.in.php file add a new column to the first (header) row:

<td class="$color">Custom field</td>

And then further down the file something like

<td class="$color">$ticket[custom1]</td>

Where "custom1" is the name "custom" + the number of the custom field you want to show. So if you want to show the first custom field use "custom1", if the second "custom2", etc...

Posted: Thu Nov 05, 2009 2:13 pm
by mtwelve
Fantastic!

This is brilliant Klemen.


Thanks for helping with this