Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Adding users custom contact information into the agent ticket list

HI,

I would like to add a student ID number to the agent ticket list. This student ID number is a required custom field in the users contact information which they have to provide to submit a ticket. I know how to add other properties like the users email into the list. But I don't know how to get this custom information from the database? Is that possible at all? 

In addition I would also like to modify the search field to that I can also search for this custom student ID number?

I would be very happy if you could help me with the sql query and where to edit it.

osTicket Version: v1.10 (901e5ea)
Apache: Apache/2.4.10 (Debian)
mySQL:5.7.15
PHP: 5.6.25

Comments

  • This thread covers pretty much every contemporary version of osTicket for how to add columns.


    Side note: once the Custom Queues feature is included (rumored to be included in 1.11) editing the source for this should no longer be necessary.
  • Yes I look at the thread how I still have the following problem:

    I added the field "course" into the contact information form (see image 1).

    Then I added the 'cdata__course' (see image 2).

    But I get the following DB-error email (see image 3)

    What do I miss here?




    contact information.png
    2148 x 1432 - 302K
    ticket.inc.php.png
    2516 x 606 - 110K
    DB-error email.png
    1442 x 1288 - 566K
  • Hi, i have the same problem as @TistormI added the field "phone" into the contact information form and when i adding  'cdata__phone' to $tickets->values (at line 375) I get DB-error email.
  • @ronitbs I see in your other thread here:


    That you figured out your problem, so we wont yell at you for hijacking this thread :-)

    @Tistorm, maybe ronitbs solution in the thread above can help point you in the right direction to solve yours as well. Make sure you are putting in the correct column variable for the information you are trying to display.

  • Thx @blueyeguy,  Thanks for the help, for the quick answers, and of course for not having yelled at me :-)

    We are now ready to go prodction with osTicket in our company!!!


  • edited January 5
    Thx @blueyegy and @ronitbs but if I include just 'user__cdata__phone' into the $tickets->values I get the following error message:

    Table 'osticketdb.ost_user__cdata' doesn't exist
  • Addition: 

    I also inspected the osticketdb and I found that the table "ost_user__cdata" does not exist and the data from this form stored in the table "ost_form_entry_values". 

    database.png
    737 x 626 - 133K
  • My understanding is that cdata-tables like ost_user__cdata are materialized views of custom data. osTicket drops and rebuild that tables constantly. The data in this tables is pulled from other tables like "ost_form_entry_values". 
  • @mfelber is correct.  the __cdata table is a temporary system table.  It should not be used in this way.
  • OK that explains a lot thx!

    So is it somehow possible to access these values and display them in the ticket list?
  • I wrote a short sql query that transfers the data to the desired field. 
    from "ost_form_entry_values" to "ost_user__cdata" mapped according to user_id

  • In what file did you write this sql query and in which line ?
Sign In or Register to comment.