I did suspect that line 133 could only contain certain values, it looks like your trying to have organisation name added.
your jumping from the ost_ticket table (user id) to a lookup in the user table (org_id) to the organisational table (name)

the naming seems to be 'user' to reference the table name
a double underscore __ to skip over
org for the organisation table
__ to skip over
and finally 'name' the field you need

so try this 'userorgname' it seems to work for me

to follow that
bear in mind my line numbers may be different to yours due to my own mods, but here is all the edits i used

Line 133
$tickets->values(
'ticket_id', 'number', 'created', 'isanswered', 'source', 'status_id',
'status__state', 'status__name', 'cdata__subject', 'dept_id',
'dept__name', 'dept__ispublic', 'user__default_email__address', 'user_id', 'user__org__name', 'user__name', 'updated'
);

Line 225-227
<th width="50">
<a href="tickets.php?sort=status&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By OrgID"><?php echo __('OrgID');?>&nbsp;<i class="icon-sort"></i></a>
</th>

Line 274
<td><?php echo $T['user__org__name'];?></td>

I am not adding Orgnization. There is one customized Field in Ticket form itself as tktClient which I am adding.
I have tried again now, but as soon as add variable in Line 133 the grid data disappear. So It seems that there is missing one step prior to adding suggested changes, which is resulting in this behavior.

    apyash

    is the data for that field held in the tickets table itself? or another table?

    edit: i'm guessing that if this is a custom form, you'd be referencing the 'form_entry_values' table
    its gonna be rather complex to get that info.
    (i'm actually new to this myself)

    I'm shortly going to look at getting custom form fields into outbound emails to clients. So i might drag up something there that may help.

    i tended to find the field names for that line by trial and error and educated guesses, your looking to jump over a couple of tables and draw data in, i'm not sure how thats done, maybe your best bet is to replicate your system in a dev environment and start using print_r and echo commands throughout the script to see what data is being help where, i always find this to be my favourite troubleshooting technique.

    remember to do the same in screens that do display the data and figure out where the data comes from.

      hsaartet is the data for that field held in the tickets table itself?

      Yes its in same Ticekt Tables only. I am able to view the Updated & USer name Successfully. However, facing issue on Custom Field mentioned on Ticket Form

      so yeah, as these are custom fields you'll have to figure out how to reference them and select them from the 'form_entry_values' table in the database.

      i'd also say that if you would like the field to be visible to clients, then you'll need to change the config to make it publicly visible.

      trust me on the print_r and echo commands to see what you can find in the existing variables

      Okay, let me try with suggestion.
      Thanks for resolution.

      I am able to do pre-defined values with above method username and updated. Thanks for support.
      But still trying to add ticket Form Custom Fields which are coming from from Custom List as those need to be defined differently then Pre-Defined ones.

      12 days later

      today, I am able to get that new Customized Field from ticket_cdata Table. However getting 3 values in this now ID, Value, & Abbreviation as mentioned below.

        7 months later

        apyash , do you mind sharing how you achieved displaying the data from a custom field?

        Thanks!

          9 months later

          Hola yo quiero hacer algo parecido ya consegui agregar la columna de topic pero al parecer nadamas me muestra los ID de los temas que di de alta como puedo logra que salgan los nombres

          `$tickets->values(
          'ticket_id', 'number', 'created', 'isanswered', 'source', 'status_id',
          'statusstate', 'statusname', 'cdatasubject', 'dept_id',
          'dept
          name', 'deptispublic', 'userdefault_email__address', 'user_id', 'topic'
          );
          Agrege ""topic"" porque en la base de datos asi vi que esta el paramertro
          y agrege esta linea para la tabla y al final un echo

          <th width="120">
          <a href="tickets.php?sort=topic&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By topic"><?php echo __('Categoria');?>&nbsp;<i class="icon-sort"></i></a>
          </th>

          <td><?php echo $T['topic'];?></td>

          7 months later

          Dear @apyash

          can you share how did you show data from a custom form?

          Write a Reply...