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
Dynadata Offline
Member
 
Posts: 171
Join Date: Feb 2008
Location: Netherlands
Change Ticket ID - 25-03-2008, 11:45 AM

I suggested it as a new feature by the think tank but I'm afraid it will take to long before it will be implemented.
This is the link to the article: Ticket ID Type
I hope you guys can help me out with this.

In "\modules\tickets\functions_ticketcore.php" you will find the function "generateTicketMask()".
My intention is that it takes the first 3 letters from the department (with substring) and then generates some random numbers.

Now comes the main problem.....it should take the first 3 letters from the department but the ticket is not yet submitted.
So how to get the department? Can you get this from the current URL? (Support Center » Submit a Ticket » General)

Any help would be appriciated.
   
Reply With Quote
  (#2) Old
Dynadata Offline
Member
 
Posts: 171
Join Date: Feb 2008
Location: Netherlands
27-03-2008, 09:02 AM

Quote:
Originally Posted by Dynadata View Post
So how to get the department? Can you get this from the current URL? (Support Center » Submit a Ticket » General)
Anyone can point me to the right direction?
   
Reply With Quote
  (#3) Old
Dynadata Offline
Member
 
Posts: 171
Join Date: Feb 2008
Location: Netherlands
27-03-2008, 04:17 PM

When I submit a ticket the nav. URL is:
Support Center » Submit a Ticket » General

When you hover your mouse over the department (General) you will see something like:
http://domain.com/support/index.php?_m=tickets&_a=submit&step=1&departmentid =1

So I opened \modules\tickets\functions_ticketcore.php and search for function generateTicketMask().
Inside this function I replaced the $ticketmaskid by:
$ticketmaskid = $_GET['departmentid'] . "-" . $num;

This aint working....I really have no idea why but it gives me an empty string.
Does anyone have an idea what I could do to get the current departmentid inside the generateTicketMask() function?
   
Reply With Quote
  (#4) Old
Dewak Offline
Member
 
Dewak's Avatar
 
Posts: 139
Join Date: Feb 2008
27-03-2008, 08:42 PM

Howdy again,

I think it's not possible to access $_GET['departmentid'] from functions_ticketcore.php. This is what you have to do:

1. Change the declaration of Ticket Mask function from

function generateTicketMask() to function generateTicketMask($deparmentid = 1)

2. In the createTicket() function send the department id to the generateTicketMask() function like this:

$ticketmaskid = generateTicketMask($departmentid);

3. Check if the Ticket Mask function is called from other place and add the $departmentid parameter.

This way you will be able to get the parameter id.

Best


Andres Berdugo
Email & MSN: andres[at]dewak.com
Skype: andres.dewak
Dewak: Kayako Development, Consultancy and Support
http://www.dewak.com
   
Reply With Quote
  (#5) Old
Dynadata Offline
Member
 
Posts: 171
Join Date: Feb 2008
Location: Netherlands
28-03-2008, 08:52 AM

Dewak.....you're the man! It works perfectly now!
Thank you sooooo much!

I will post a small tutorial how you can do this by the modifications.
   
Reply With Quote
  (#6) Old
Dynadata Offline
Member
 
Posts: 171
Join Date: Feb 2008
Location: Netherlands
28-03-2008, 11:22 AM

EDIT: solved...

Last edited by Dynadata; 28-03-2008 at 11:29 AM.
   
Reply With Quote
  (#7) Old
Dewak Offline
Member
 
Dewak's Avatar
 
Posts: 139
Join Date: Feb 2008
28-03-2008, 02:31 PM

You are welcome, I'm glad you were able to solve it.
Can't wait to see the full tutorial!


Andres Berdugo
Email & MSN: andres[at]dewak.com
Skype: andres.dewak
Dewak: Kayako Development, Consultancy and Support
http://www.dewak.com
   
Reply With Quote
  (#8) Old
Dynadata Offline
Member
 
Posts: 171
Join Date: Feb 2008
Location: Netherlands
28-03-2008, 03:27 PM

@Dewak: See Change Ticket ID depending of your department post #1 and #4.
   
Reply With Quote
Reply

Tags
ticket

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
Controlling who can change a ticket status/priority hmac SupportSuite, eSupport and LiveResponse 3 30-04-2008 01:45 PM
Status change when changing Department of Ticket Xeserve Wont Implement / Already Implemented 8 02-02-2008 06:53 PM
Misc / General Seporate "Can Change Ticket Properties" Out craigbrass Feature Requests 6 17-12-2007 12:09 AM
New Build: 3.10.02 STABLE Ryan Lederman News and Announcements 0 05-03-2007 08:53 PM



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