Kayako Fusion : Controlling the display of sub departments

Kayako Add comments

We run Kayako fusion over at BlueThunder, and one of the issues I have had is dealing with sub-departments.

e.g.

GROUP1

  • dept1
  • dept2

I do not want customers to be able to to submit tickets to the parent department "GROUP1",  as this is just a a group/label, but fusion provides no way to stop this as it treats everything as a department., and does not allow to simply treat the parent as a group.

I never found any solution to this, so decided to do it myself, hopefully others may find this useful.

In the template editor, find the template named "submitticket_departments"

Find the following line, right after the first <(foreach block


<td width="16" align="left" valign="middle" class="zebraodd"><input type="radio" name="departmentid" onclick="javascript: ToggleTicketSubDepartments('<{$_item[departmentid]}>');" value="<{$_item[departmentid]}>" id="department_<{$_item[departmentid]}>"<{if $_selectedDepartmentID == $_item[departmentid]}> checked<{/if}> /></td>

and replace it with this


<td width="16" align="left" valign="middle" class="zebraodd"><input type="radio" name="departmentid" onclick="javascript: ToggleTicketSubDepartments('<{$_item[departmentid]}>');<{if count($_item[subdepartments]) >= 1}>unselect(this);<{/if}>" value="<{$_item[departmentid]}>" id="department_<{$_item[departmentid]}>"<{if $_selectedDepartmentID == $_item[departmentid] && count($_item[subdepartments]) == 0 }> checked<{/if}> /></td>

This will stop any departments that have sub-departments being selected, even if it is set as the default department.
If you also want all the departments to be expanded by default

find this line, after the second <(foreach block


<tr class="ticketsubdepartments_<{$_item[departmentid]}>" style="<{if $_displayParentDepartmentID != $_item[departmentid]}>display: none;<{/if}>"> 

and change it to




<tr class="ticketsubdepartments_>{$_item[departmentid]}>">



0 responses to “Kayako Fusion : Controlling the display of sub departments”

Leave a Reply

Leave this field empty

Powered by Mango Blog. Design and Icons by N.Design Studio