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.

How to: Add a custom field to the Ticket General Properties bar

Discussion in 'Installation and setup (Kayako Classic Download)' started by Ryan Carrigan, Nov 8, 2013.

  1. Ryan Carrigan

    Ryan Carrigan New Member

    We are looking to have a custom field be added to the General Tickets Properties bar (green bar when viewing ticket). We are trying to speed up productivity but have required custom fields in the EDIT tab that need to be filled in before submitting a response or closing a ticket. We are looking to add a custom field onto the green General Ticket Properties bar to allow users to navigate to only one page instead of the EDIT page and then back to General or reply tab.

    Is there a way to add another field to the ticket property bar or are these the only fields that can be added?

    (Department, Owner, Type, Status, Property)
     
  2. Uriel

    Uriel Member

    +100
     
  3. dspender

    dspender New Member

    +1000

    Anyone have an answer for this?????

    (please note, the fields that you can modify by clicking EDIT are NOT editable in the mobile app )
     
  4. Rob_G

    Rob_G New Member

    that would be very convenient to have it on green bar.
     
  5. Gary McGrath

    Gary McGrath Staff Member

    Hi there,

    If you wanted to add a custom field there, you could create a custom app and use the "staff_ticket_generaltab" hook to add in the field. then use the "staff_ticket_reply" and forward hooks to process and update the custom field as required.

    Gary
     
  6. Ryan Carrigan

    Ryan Carrigan New Member

    Hi Gary,

    Thanks for the response. Can you elaborate on the process you describe above? What kind of app are we talking about? I would really be interested in getting this setup if possible. Or if there is an example of an app that we could model?

    Thanks again for your help.
     
  7. Ilona

    Ilona Member

    How could we remove some of the fields from the green bar?
     
  8. Gary McGrath

    Gary McGrath Staff Member

    Hi Llona,

    What are you looking to remove? those fields are generally required

    Gary
     
  9. Ilona

    Ilona Member

    We'd like to hide the Ticket Properties Bar, so that some staff members could see and change it (change Status, for example) and some staff couldn't have access to the bar generally, couldn't see it or change anything there. How can we do it in the code?
     
  10. Gary McGrath

    Gary McGrath Staff Member

    If you check the file class.view_ticket.php ( __apps\tickets\staff )

    near line 119 it will state "begin Properties"

    This is where you can add the check for staff and then not display if they dont have access. How do you want to control access, staff teams? individuals?

    Gary
     
  11. Ilona

    Ilona Member

    Oh, thank you! We'd like some staff members have no access to make any changes at the green bar (ticket properties bar). We also may consider having the settings when the green bar is visible, but no editing is available. At the worst we would like to hide the Status option or make it unchangeable for some staff.
     
  12. Gary McGrath

    Gary McGrath Staff Member

    So the way I would recommend to do this is to create a new staff team from the admin panel, make is so all the staff who "should" be able to edit the status as being a member of that team

    Then you can edit the code and use:

    Code:
    
    If ($_SWIFT->Staff->GetProperty('staffgroupid') == 20){
     
            $_ticketStatusSelectHTML = '<div class="ticketgeneralpropertiesselect"><div id="genticketstatusid_container"><select id="selectgenticketstatusid" style="width: 160px;" name="genticketstatusid" onchange="javascript: ResetStatusParentColor(this, \'generalticketproperties\');" class="swiftselect">';
            $_ticketStatusSelectHTML .= $this->GetSelectOptions($_SWIFT_TicketObject, self::TYPE_STATUS);
            $_ticketStatusSelectHTML .= '</select></div></div>';
    
    }else{
            $_ticketStatusSelectHTML = '<div class="ticketgeneralpropertiesselect"><div id="genticketstatusid_container"><select id="selectgenticketstatusid" style="width: 160px;" name="genticketstatusid" onchange="javascript: ResetStatusParentColor(this, \'generalticketproperties\');" class="swiftselect">';
            //$_ticketStatusSelectHTML .= $this->GetSelectOptions($_SWIFT_TicketObject, self::TYPE_STATUS);
            $_ticketStatusSelectHTML .= '</select></div></div>';
    }
    
    
    where 20 = the ID of the new staff team you made

    Gary
     
  13. Ilona

    Ilona Member

    Thank you! We'll try to implement this :)
     
  14. Ilona

    Ilona Member

    Hello!

    We've tried the code and it worked just fine for the Status. As it's written <div id="genticketstatusid_container"><select id="selectgenticketstatusid"> can be applied for the status, could you please tell which id stands for the owner and department options?
    I've attached a picture of how we would like to see it. Cells should be disabled completely.
    properties bar.jpg

    And is there any way to remove the "green panel" (properties bar) completely for some staff members like it had never been there?))) As I was saying we have different groups of staff. We'd like to restrict access for the properties bar for one group.
    Is it even possible to achieve??))))
    properties bar1.png


    I would appreciate if you could give any advice on this matter.
     

Share This Page