Kayako logo
Developers & Code Interested in customizing your Kayako products? Discuss modifications and develop your own mods with the community.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
Thijs Offline
Member
 
Posts: 253
Join Date: Jan 2007
Adding department using Department function - 29-01-2008, 10:05 PM

Hi,

I'm figuring out the best way to add a department not using the form in the admin panel.

I want to use the includes/functions_departments.php file for this and want to read out the last order number first.

I was thinking about setting the order number column on autoincrement because I actually don't care about how they are ordered.

But, when I need to do, I first need to grab that one and I was not able to fnd out the best way.

Ok, we have a function for adding the department:

function insertDepartment($title, $departmentmodule, $tgroupidlist, $type = "1", $displayorder = "1", $isdefault = false)

So I can actually call this like:

insertDepartment(name, tickets, {dunno yet}, public, {?? display order ??}, 0);

This should be working if you ask me in a normal PHP file.

Because we have the function getLastDepartmentDisplayOrder() to check the latest order number, shall I just set this one to:

$orderno = function getLastDepartmentDisplayOrder();

and place $orderno in the line above ?

Some advise would be nice

Thanks.
   
Reply With Quote
  (#2) Old
Thijs Offline
Member
 
Posts: 253
Join Date: Jan 2007
31-01-2008, 05:31 AM

OK, so far so good.

There are some relation tables that I need to set also, but it all seems to be doable.

Something I don't get so far is when I add a new templategroup and want to import a template into that one, also the registry table is updated.

What is the usage of that table ?
   
Reply With Quote
Reply

Tags
department, function

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Staff to Department pairings NC Software SupportSuite, eSupport and LiveResponse 4 31-01-2008 10:57 PM
how do I get an alert when a ticket is assigned to a new department Rodney B How do I? 3 22-09-2007 01:18 PM
how to add a department in filter tickets view Angurio SupportSuite, eSupport and LiveResponse 1 18-01-2007 06:57 PM
Unique template group for each Department and to list the same in department list sureshkumar.mr SupportSuite, eSupport and LiveResponse 2 29-09-2006 02:06 PM
Swift CLI problem joshopkins SupportSuite, eSupport and LiveResponse 2 02-09-2006 06:12 AM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46