1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

Updating custom field by custom query, custom field group is not open by default.

Discussion in 'Developing, APIs and extending' started by BlackHawkRob, Feb 23, 2012.

  1. BlackHawkRob

    BlackHawkRob Member

    Hey everybody,

    I was working on a small export tool for our kayako helpdesk. I made an export tool for MantisBT, and it works just fine. There is an 'mantis ID' custom field in Kayako in which the mantis post id will come. Now the update works just fine. If the custom field is already set, we delete it from the database and add it again. It shows up in the custom field in the ticket.

    Now the problem is, the group in which the custom field is, is not open by default. If i edit a custom field via the ticket system and update it, it is visible.

    I think this has something to do with the cache that gets refreshed by the CustomFieldValue class. (Update, UpdatePool and such). I just don't know whats happening when something gets updated. Is there a way that i can open the custom group view in the ticket, without using Kayako's API or internal classes? The export tool is a simple .php file which connects to the database.

    In case you do not want to read this all: How can i open a custom field group without using Kayako's API or classes? A small PHP file updates the custom field value (and it works) but the custom field group does not show up in the ticket, unless i manually edit it inside the ticket in kayako.

    Thanks in advance!

    Best regards,
    Rob Quist
     
  2. BlackHawkRob

    BlackHawkRob Member

    Okay i figured it out. The cache controller wasn't giving the custom field to the static view. I had to add a record in the 'customfieldlinks' table.

    INSERT INTO swcustomfieldlinks (grouptype,linktypeid,customfieldgroupid) VALUES (3,'".$ticket."','4')

    Cheers!
     

Share This Page