Kayako logo
Feature Requests Have a feature request for SupportSuite, eSupport and LiveResponse? Post in here.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
greengiant Offline
Member
 
Posts: 103
Join Date: Feb 2004
Add Notes and Custom Fields to Ticket Reply Tab - 31-05-2008, 04:36 PM

Hi,

When sending a reply to a ticket as staff, currently you can not see the ticket notes or custom fields on the reply tab. We use these alot in our support desk and often need to refer to that information when creating a reply. We solved this by adding the notes and custom fields to that tab as follows.

Edit the /modules/tickets/staff_viewticket.php file at line 753 find this section of code

Code:
addHiddenField("ticketlabelid", $_REQUEST["ticketlabelid"]);
addHiddenField("ticketid", $_ticket["ticketid"]);
echo '</table>';
printFormEnd();
before the echo line in the above code, add the following.

Code:
// ======= Show Notes on Ticket Reply Tab =======
    foreach ($_ticket["notes"] as $key=>$val)
    {
        if ($val["forstaffid"] == 0 || $val["forstaffid"] == $_SWIFT["staff"]["staffid"] || $val["bystaffid"] == $_SWIFT["staff"]["staffid"])
        {
            if (empty($val["bystaffid"]))
            {
                $byname = $_SWIFT["language"]["alsystem"];
            } else {
                $byname = htmlspecialchars($_SWIFT["staffcache"][$val["bystaffid"]]["fullname"]);
            }
            echo '<tr><td align="left" valign="top" colspan="8" style="PADDING: 0px 0px 4px 0px;"><div class="ticketcboxpad"><div class="ticketnote"><div class="ticketcbox"><table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr><td width="1" align="left"><img src="'. $_SWIFT["themepath"] .'icon_topic'. iif($val["dateline"]>$_SWIFT["staff"]["lastvisit"], "yellow") .'.gif" border="0" /></td>
            <td align="left"><span class="smalltext">&nbsp;'. sprintf($_SWIFT["language"]["notetitleformat"], $byname, edate($_SWIFT["settings"]["dt_datetimeformat"], $val["dateline"]), strColorDate(DATENOW-$val["dateline"], true, true)) .'</span></td><td width="1" align="right"><a href="index.php?_m=tickets&_a=ticketactions&action=delticketnote&ticketid='. $_ticket["ticketid"] .'&ticketnoteid='. $val["ticketnoteid"] .'"><img src="'. $_SWIFT["themepath"] .'icon_ftrash.gif" border="0" /></a></td></tr>
            <tr><td colspan="3"><HR class="notehr"></td></tr>
            <tr class="ticketnotecontent"><td colspan="3"><span class="smalltext">'. getProcessedHTML($val["notes"]) .'</span></td></tr>
            </table></div></div></div></td></tr>';
        }
    }
    // ======= Show Custom Fields on Ticket Reply Tab =======
    foreach ($_ticket["fields"] as $key=>$val)
    {
        if ($val["linktype"] == CUSTOMFIELD_TIMETRACK)
        {
            continue;
        }

        echo '<tr><td align="left" valign="top" colspan="8" style="PADDING: 0px 0px 4px 0px;"><div class="ticketcboxpad"><div class="ticketcf"><div class="ticketcbox"><table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
        <td width="100%" align="left"><img src="'. $_SWIFT["themepath"] .'icon_customfield.gif" align="absmiddle" border="0" /><span class="smalltext">&nbsp;'. $val["grouptitle"] .'</span></td><td width="1" align="right">'. iif($val["linktype"]==CUSTOMFIELD_USERTICKET||$val["linktype"]==CUSTOMFIELD_STAFFTICKET||$val["linktype"]==CUSTOMFIELD_STAFFUSERTICKET||$val["linktype"]==CUSTOMFIELD_USER, '<a href="index.php?_m=tickets&_a=ticketactions&action=delcflink&ticketid='. $_ticket["ticketid"] .'&customfieldlinkid='. $val["customfieldlinkid"] .'"><img src="'. $_SWIFT["themepath"] .'icon_ftrash.gif" border="0" /></a>') .'</td></tr>
        <tr><td colspan="2"><HR class="notehr"></td></tr>
        <tr class="ticketcfcontent"><td colspan="2"><table border="0" cellpadding="3" cellspacing="0" width="100%">';
        $colarray = $infolist = array();
        foreach ($val["fields"] as $fieldkey=>$fieldval)
        {
            unset($fieldvalue);
            if (_is_array($fieldval["fieldvalue"]))
            {
                foreach ($fieldval["fieldvalue"] as $fkey=>$fval)
                {
                    $fieldvalue .= htmlspecialchars($fval)."<BR />";
                }
            } else {
                $fieldvalue = nl2br(htmlspecialchars($fieldval["fieldvalue"]));
            }
            $infolist[] = array($fieldval["title"].":", autoLink($fieldvalue));
        }
        renderSplitFields($infolist, "ticketcfrow1", "ticketcfrow2");

        echo '</table></td></tr></table></div></div></div></td></tr>';
    }
Please add this to the next release of esupport.
   
Reply With Quote
  (#2) Old
Andrew Scott Offline
Member
 
Andrew Scott's Avatar
 
Posts: 147
Join Date: Apr 2008
Location: Swindon, UK
31-05-2008, 09:02 PM

cool +1


Andrew Scott
kayako]at[holbi.co.uk
Kayako Development Manager
Holbi Kayako development

   
Reply With Quote
Reply

Tags
custom, notes, tab, 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
Custom field entries left over from 2.3.5 -> v3 Mikie SupportSuite, eSupport and LiveResponse 3 24-07-2007 12:10 PM
preset values in custom fields meltemi SupportSuite, eSupport and LiveResponse 1 18-01-2007 07:06 PM
Kayako SupportSuite v3.04.10 Stable Build Varun Shoor News and Announcements 2 06-10-2006 10:41 PM
eSupport v2.1.6 and InstaAlert Released! Varun Shoor News and Announcements 5 11-10-2003 07:48 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 47