Kayako Logo
Modifications & Addon Releases Modification guides and addons are posted here to share with the community. Do not post requests in here!

Reply
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  (#1) Old
logicway Offline
Member
 
Posts: 62
Join Date: Jul 2006

eSupport
Manual Staff Ticket Entry -> Client Fullname => Author - 18-08-2006, 03:18 PM

Just made a hack to have the client to be the author of a ticket, when staff creates a ticket manually (phone or email). Also the fullname is required (this way staff never will be the author). And you can search for the fullname and insert it into the ticket. It is for version 3.00.90.

File: /modules/core/functions_userlookup.php

line 72; search for:
PHP Code:
addslashes($val["emails"][0]) 
replace by:
PHP Code:
addslashes($val["fullname"]) 
line 111; search for:
PHP Code:
addslashes($_contact["emails"][0]) 
replace by:
PHP Code:
addslashes($_contact["fullname"]) 
File: /modules/tickets/staff_newticket.php
line 48; search for:
PHP Code:
if (trim($_POST["replycontents"]) == "" || trim($_POST["opt_subject"]) == "" || !checkCustomFieldContent(CUSTOMFIELD_STAFFTICKET$_POST["departmentid"])) 
replace by:
PHP Code:
if (trim($_POST["replycontents"]) == "" || trim($_POST["opt_subject"]) == "" || trim($_POST["opt_username"]) == "" || !checkCustomFieldContent(CUSTOMFIELD_STAFFTICKET$_POST["departmentid"])) 
line 93; search for:
PHP Code:
$posttype POST_STAFF
replace by:
PHP Code:
$posttype POST_CLIENT
line 255; search for:
PHP Code:
if ($_REQUEST["type"] == "phone")
    {
        echo 
'<tr class="'getRowBG() .'">
    <td width="100" align="left"><span class="tabletitle">'
$_SWIFT["language"]["fophone"] .'</span></td>
    <td align="left"><input type="text" class="swifttext" size="40" name="opt_userphone" value="'
$_POST["opt_userphone"] .'">&nbsp;&nbsp;<a href="javascript:popupInfoWindow(\''$_SWIFT["swiftpath"] .'staff/index.php?_m=core&_a=userlookup&formname=newticketform&formfield=opt_userphone&sessionid='$_SWIFT["session"]["sessionid"] .'\');"><img src="'$_SWIFT["themepath"] .'icon_searchlookup.gif" title="'$_SWIFT["language"]["lookup"] .'" border="0" align="absmiddle" /></a>&nbsp;&nbsp;<span class="smalltext">'$_SWIFT["language"]["noptional"] .'</span></td></tr>';
    }

        echo 
'<tr class="'getRowBG() .'">
    <td width="100" align="left"><span class="tabletitle">'
$_SWIFT["language"]["fullname"] .'</span></td>
    <td align="left"><input type="text" class="swifttext" size="40" name="opt_username" value="'
$_POST["opt_username"] .'">&nbsp;&nbsp;<a href="javascript:popupInfoWindow(\''$_SWIFT["swiftpath"] .'staff/index.php?_m=core&_a=userlookup&formname=newticketform&formfield=opt_username&sessionid='$_SWIFT["session"]["sessionid"] .'\');"><img src="'$_SWIFT["themepath"] .'icon_searchlookup.gif" title="'$_SWIFT["language"]["lookup"] .'" border="0" align="absmiddle" /></a>&nbsp;&nbsp;<span class="smalltext">'iif($_REQUEST["type"]=="email"$_SWIFT["language"]["noptional"]) .'</span></td></tr>'
replace by:
PHP Code:
if ($_REQUEST["type"] == "phone")
    {
        echo 
'<tr class="'getRowBG() .'">
    <td width="100" align="left"><span class="tabletitle">'
$_SWIFT["language"]["fophone"] .'</span></td>
    <td align="left"><input type="text" class="swifttext" size="40" name="opt_userphone" value="'
$_POST["opt_userphone"] .'">&nbsp;&nbsp;<a href="javascript:popupInfoWindow(\''$_SWIFT["swiftpath"] .'staff/index.php?_m=core&_a=userlookup&formname=newticketform&formfield=opt_userphone&sessionid='$_SWIFT["session"]["sessionid"] .'\');"><img src="'$_SWIFT["themepath"] .'icon_searchlookup.gif" title="'$_SWIFT["language"]["lookup"] .'" border="0" align="absmiddle" /></a>&nbsp;&nbsp;<span class="smalltext">'$_SWIFT["language"]["noptional"] .'</span></td></tr>';
    }

        echo 
'<tr class="'getRowBG() .'">
    <td width="100" align="left"><span class="tabletitle">'
$_SWIFT["language"]["fullname"] .'</span></td>
    <td align="left"><input type="text" class="swifttext" size="40" name="opt_username" value="'
$_POST["opt_username"] .'">&nbsp;&nbsp;<a href="javascript:popupInfoWindow(\''$_SWIFT["swiftpath"] .'staff/index.php?_m=core&_a=userlookup&formname=newticketform&formfield=opt_username&sessionid='$_SWIFT["session"]["sessionid"] .'\');"><img src="'$_SWIFT["themepath"] .'icon_searchlookup.gif" title="'$_SWIFT["language"]["lookup"] .'" border="0" align="absmiddle" /></a>&nbsp;&nbsp;<span class="smalltext">'iif($_REQUEST["type"]=="email"$_SWIFT["language"]["noptional"]) .'</span></td></tr>'
That's it.

Last edited by logicway : 20-08-2006 at 02:11 PM.
   
Reply With Quote
  (#2) Old
Varun Shoor Offline
Chief Executive Officer
 
Varun Shoor's Avatar
 
Posts: 2,827
Join Date: May 2003

18-08-2006, 08:00 PM

Excellent Work, Thanks for Sharing.

Regards,

Varun Shoor


Varun Shoor (varun.shoor ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#3) Old
logicway Offline
Member
 
Posts: 62
Join Date: Jul 2006

eSupport
18-08-2006, 09:11 PM

Quote:
Originally Posted by Varun Shoor
Excellent Work, Thanks for Sharing.
I am also working on a some extra features on the lookup-window. I want that you can only select an email-address, only if you are searching for an email-address. This way you can't fill in i.e. a phonenumber, where you should fill in an email-address.
   
Reply With Quote
  (#4) Old
SWG Offline
New Member
 
Posts: 11
Join Date: Jan 2006

20-08-2006, 12:54 AM

I get the following error:

Code:
Parse error: parse error, unexpected ']' in /home/XXXXXX/public_html/support/modules/tickets/staff_newticket.php on line 48
Any suggestions?

Thanks!
   
Reply With Quote
  (#5) Old
logicway Offline
Member
 
Posts: 62
Join Date: Jul 2006

eSupport
20-08-2006, 02:10 PM

Quote:
Originally Posted by SWG
I get the following error:

Code:
Parse error: parse error, unexpected ']' in /home/XXXXXX/public_html/support/modules/tickets/staff_newticket.php on line 48
Any suggestions?

Thanks!
Check line 48. This should be:
PHP Code:
if (trim($_POST["replycontents"]) == "" || trim($_POST["opt_subject"]) == "" || trim($_POST["opt_username"]) == "" || !checkCustomFieldContent(CUSTOMFIELD_STAFFTICKET$_POST["departmentid"])) 
   
Reply With Quote
  (#6) Old
SWG Offline
New Member
 
Posts: 11
Join Date: Jan 2006

21-08-2006, 02:03 AM

Nice Job!!

Thank you for providing this handy modification.
   
Reply With Quote
  (#7) Old
logicway Offline
Member
 
Posts: 62
Join Date: Jul 2006

eSupport
21-08-2006, 02:10 PM

Quote:
Originally Posted by logicway
I am also working on a some extra features on the lookup-window. I want that you can only select an email-address, only if you are searching for an email-address. This way you can't fill in i.e. a phonenumber, where you should fill in an email-address.
I have this feature also working now. Because there are a lot of changes, I can't make a list of lines you should replace. See attachment for the file (/modules/core/functions_userlookup.php).

Maybe the Kayako-developers could look into these modifications. They could possibly be finetuned.
Attached Files
File Type: zip functions_userlookup.zip (2.1 KB, 97 views)

Last edited by logicway : 21-08-2006 at 02:39 PM.
   
Reply With Quote
  (#8) Old
caitlyntw Offline
Member
 
Posts: 99
Join Date: Jul 2006

22-08-2006, 04:55 AM

Could Kayako incorporate this into the 3.098 cvs build?
   
Reply With Quote
  (#9) Old
Varun Shoor Offline
Chief Executive Officer
 
Varun Shoor's Avatar
 
Posts: 2,827
Join Date: May 2003

22-08-2006, 11:18 AM

I will look into this, A lot of our clients also use the current way of working to create new emails from the helpdesk and follow up the conversation through a ticket. Implementing this as a de facto feature will break that all up.

Regards,

Varun Shoor


Varun Shoor (varun.shoor ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#10) Old
logicway Offline
Member
 
Posts: 62
Join Date: Jul 2006

eSupport
22-08-2006, 11:34 AM

Quote:
Originally Posted by Varun Shoor
I will look into this, A lot of our clients also use the current way of working to create new emails from the helpdesk and follow up the conversation through a ticket. Implementing this as a de facto feature will break that all up.
I don't understand why you think this feature will break.

The majority of my hack is nothing but being able to search also for a fullname (besides emailaddress and phonenumber) form the current users/contacts and putting all items (phone#, email, fullname) in the right box, so you don't i.e. accidentally get a phonenumber where you should enter an emailaddress.

The small part of my hack is that your client is always the tickets author if the staff enters the ticket manually. Without this I find it very difficult to find out which client a ticket is about, or to search for a ticket from a certain client.
   
Reply With Quote
  (#11) Old
keyguru Offline
New Member
 
Posts: 18
Join Date: May 2006

08-09-2006, 01:52 AM

would it possible to post already modified php files (functions_userlookup.php and staff_newticket.php)? We have a rented version of the software and are not able to modify these files ourselves. This feature is very much needed and it would be great to have it before it is implemented oficially in a future release. Thank you in advance.
   
Reply With Quote
  (#12) Old
SWG Offline
New Member
 
Posts: 11
Join Date: Jan 2006

03-10-2006, 12:28 PM

Does this work in 3.0.4 "Stable"?
   
Reply With Quote
  (#13) Old
logicway Offline
Member
 
Posts: 62
Join Date: Jul 2006

eSupport
03-10-2006, 01:38 PM

Quote:
Originally Posted by SWG
Does this work in 3.0.4 "Stable"?
I did not test it yet, but I think it should work.
   
Reply With Quote
  (#14) Old
keyguru Offline
New Member
 
Posts: 18
Join Date: May 2006

05-10-2006, 03:10 AM

Bump
Could somebody please post already modified php files (functions_userlookup.php and staff_newticket.php)? I don't think this feature has yet to be implemented in official release, but it would really help to start using it before it is released. Thanks again.
   
Reply With Quote
  (#15) Old
logicway Offline
Member
 
Posts: 62
Join Date: Jul 2006

eSupport
05-10-2006, 11:17 AM

Quote:
Originally Posted by keyguru
Bump
Could somebody please post already modified php files (functions_userlookup.php and staff_newticket.php)? I don't think this feature has yet to be implemented in official release, but it would really help to start using it before it is released. Thanks again.
See attachment.
Attached Files
File Type: zip [Hack] Manual Staff Ticket Entry (v3.04.00).zip (7.5 KB, 103 views)
   
Reply With Quote
Reply


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

vB 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
Client cant see ticket created by staff techs SupportSuite, eSupport and LiveResponse 1 15-02-2007 05:35 PM
Custom Field in Staff > New Ticket - changing location. PaulV Developers & Code 0 16-08-2006 06:11 PM
v3.00.27 Stable Available Varun Shoor News and Announcements 1 05-12-2005 10:21 PM



Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0

Kayako provides online help desk software and support solutions; enabling companies to improve their support and reduce costs.

Our three main products include: SupportSuite, eSupport and LiveResponse



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