Help Desk Software & Beyond
August 23, 2017, 12:55:22 AM *
Welcome, Guest. Please login or register.
To post messages you need to register. We apologize for inconvenience, but this is to prevent spam.
Registration is instant (no email verification) and we do not ask for any personal information.

Login with username, password and session length
News: Welcome to Help Desk Software forum!
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 6
  Print  
Author Topic: [MOD] 'Customer Ticket List' (TTX v 2.23 & above including 3.0)  (Read 73869 times)
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« on: October 07, 2007, 03:45:36 PM »

Customer Ticket List Summary

This is a modification that will give your customers full access to ALL their tickets on a single list page very similar to the Operator's Ticket List.  It was created with existing chunks of TTX code mixed in with some of my own.  There's a new module and a template to download/install along with a few edits to your existing files.

It will work on both the Standard and SQL versions of TTX v 2.23 & 2.24.  It also works on version 3.0 as reported later in this thread.

Not yet tested in TTX 3.0 - Please post results if you try it. - so far all reports positive.

I've been testing this for the last couple weeks and have noticed no problems.  This is just a "search and display" type modification... no data is written or altered during usage.

Security?  Yes, I think it's very secure.  There is only ONE way that a person can access their Ticket List - through one of their Tickets.  So if somebody has a full Ticket Key, they'll have access to the corresponding owner's Ticket List.  If they only have an email address, they can't get in.  In other words, I've blocked passing of certain variables through the URL query string.  They cannot pass "&email=" through the URL to obtain access to this list.... the email variable will remain undefined and the List will be empty.  This only affects URLs using the "custdesk" command.

There will be four posts following this one.

1.  Pictures
2.  Downloads
3.  Edits
4.  Discussion/Comments

Back-up all your files in case you have some trouble applying these edits.
« Last Edit: August 23, 2012, 07:09:48 PM by Sparky » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #1 on: October 07, 2007, 04:01:04 PM »

Pictures

1.  Main default Customer Ticket List page.  Note the buttons.  At the top/right & bottom/right, we have a button that toggles between all solved and unsolved tickets for this customer.  The button label dynamically updates itself.



2.  What it looks like when displaying all the customer's closed tickets.  Note the message that states how many days your tickets are available for display.  The number of days is dynamically obtained from your configuration file.



3.  I've added two search fields, text & subject.  Some customers may have hundreds of closed tickets so this would come in handy.  Just like on the Operator's Ticket List, the search fields are sticky and you can quickly toggle your search between solved & unsolved tickets by hitting one button.  The search reset button clears out the search and returns you to either solved or unsolved tickets depending on your current list.



4.  Email the List!!  The customer can easily email the currently displayed list to themselves by hitting one button.  For security, there is no other shortcut or URL that can do this function.  Once emailed, the button will change into a confirmation message until the page is refreshed. 



5.  What a person will see if they attempt to access this command without going through a valid link on a Ticket page.

« Last Edit: November 01, 2010, 11:02:53 PM by Sparky » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #2 on: October 07, 2007, 04:08:50 PM »

Downloads

The following links to a ZIP file containing two files...

1.  custdesk.html - template file to be put in your TTX templates directory.
2.  TTXCustDesk.pm - to be put in the same location as your other PM modules.  Upload as text and set permissions to 755.

Download ZIP File Here

Note:  These files will NOT function by themselves.  Edits are required as per the following post.  However, it is perfectly OK to upload these files ahead of time... They will do nothing by themselves.


NOTE:  Apparently some people are having issues with the carriage returns within the Javascript section of these new templates being removed.  Open the new template and make sure the Javascript doesn't look like one giant long line of code.  I don't know why this is happening or how to prevent it - when I download/expand the zip it always looks perfectly fine.  If your template contains one long line of code without breaks where the Javascript should be, the template will not function.  Feel free to post here in this thread or send me a PM.
« Last Edit: November 26, 2012, 04:56:12 PM by Sparky » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #3 on: October 07, 2007, 04:09:42 PM »

Edits

1.  Upload files as per previous post.



2.  In ttx.cgi, find the following and ADD the part in red...

Quote
msgdel   => { action => 'TTXMsgEdit::del', access => 1, noheader => 1   },
custdesk   => { action => 'TTXCustDesk::custdesk', access => 0, noheader => 0   },



3.  In ttx.cgi, find the following and remove it...

Quote
$data{HELPDESKCMD} = ($cfg->get('_USER') ne undef) ? 'helpdesk':'ticket';
if ($query->param('cmd') eq 'mytickets' ||
    ($query->param('cmd') eq 'ticket' && $query->param('emailkey') ne undef && $query->param('sid') eq undef)) {
  $data{HELPDESKCMD} = 'mytickets&emailkey=' . $query->param('emailkey');
}

replace it with this...

Quote
#### modified VIEW TICKET LINKS
my $command;
if ($cfg->get('_USER') ne undef) {
    $command = 'helpdesk';
} else {
    $command = 'ticket';
}
$data{HELPDESKCMD} = '<a href="'.$ENV{SCRIPT_NAME}.'?cmd='.$command.'&sid='.$query->param('sid').'&style='.$query->param('style').'">Ticket List</a>';
# if you're customer and on Ticket page, this generates a link to take you to Customer Ticket List
if (($query->param('cmd') eq 'ticket' || $query->param('cmd') eq 'custdesk') && $cfg->get('_USER') eq undef) {
  $data{HELPDESKCMD} = '<a href="#" onclick="return custdesk()">My Tickets</a>';
} elsif ($cfg->get('_USER') eq undef) {
  $data{HELPDESKCMD} = '<a href="'.$ENV{SCRIPT_NAME}.'?cmd='.$command.'&sid='.$query->param('sid').'&style='.$query->param('style').'">View Ticket</a>';
}



4.  In header.shtml

find and remove this...

Quote
<a href="(%ENV_SCRIPT_NAME%)?cmd=(%HELPDESKCMD%)&sid=(%INPUT_sid%)&style=(%INPUT_style%)">Tickets</a>

replace it by adding this...

Quote
(%HELPDESKCMD%)



5.  In TTXDesk.pm
(to make the search filter)

a.  buildfilter section, find the following and ADD the part in red...

Quote
my ($cfg, $query, $data, $cfg2) = @_;

b.  buildfilter section, find the following and DELETE the part in red...

Quote
my @fltrcols = split(/\|/, $cfg->get('fltrcols'));

replace it with this...
Quote
my @fltrcols;
if ($cfg2 eq undef) { $cfg2 = '';}
my $filtercfg = 'fltrcols'.$cfg2;
@fltrcols = split(/\|/, $cfg->get($filtercfg));

c.  buildfilter section, find the following and DELETE the part in red...

Quote
$data->{TICKETFILTER} = $buff;

replace it with this...
Quote
if ($cfg2 ne ''){ $data->{TICKETFILTER2} = $buff; }
  else { $data->{TICKETFILTER} = $buff; }



6.  In ttxcfg.cgi, add the following line.  This defines the search fields under the Customer Ticket List...

Quote
fltrcols3=text|subject

and these lines...

Quote
dsort=updated
dsortorder=D
dwindow=30



7.  In ticket.html

add this to the bottom...

Quote
<form method="post" action="(%ENV_SCRIPT_NAME%)" id="formcustdesk">
<input type="hidden" name="cmd" value="custdesk">
<input type="hidden" name="style" value="(%INPUT_style%)">
<input type="hidden" name="sid" value="(%INPUT_sid%)">
<input type="hidden" name="key" value="(%INPUT_key%)">
<input type="hidden" name="email" value="(%TICKET_email%)">
<input type="hidden" name="tg" id="tg" value="1">
<input type="hidden" name="send" id=send value="0">
<input type="hidden" name="text" value="(%TEXT%)">
<input type="hidden" name="fltrsubj" value="(%SUBJ%)">
<input type="hidden" name="reset" id="reset" value="">
</form>

... and add this to the top

Quote
<script language="JavaScript"><!--
function custdesk(){
document.forms['formcustdesk'].submit();
return false;
}
//-->
</script>
« Last Edit: November 15, 2007, 02:06:06 PM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #4 on: October 07, 2007, 04:41:20 PM »

Discussion

Two things I'd like to mention.

1.  The 'Build Search Filter" subroutine is modified above to allow multiple search filters anywhere in TTX.  After making the modifications, I only needed to add a new macro with a corresponding config file entry to get a new search filter.  (Changes to Build Filter subroutine as per step #5 can be done at any time and was written to not effect normal default TTX operation in any way.)

2.  What used to be called "Tickets" within the top main TTX menu is now much more dynamic.  As per the mod in this thread it dynamically changes to make a little more sense depending on the user & page.

"Ticket List" - All pages when Operator is logged in ... linked to regular ticket list page (helpdesk).
"My Tickets" - All Ticket pages when nobody is logged in (Customer)  ... linked to new Customer List page as per Mod.
"View Ticket" - All remaining pages when nobody is logged in (Customer) ... linked to old Key Retrieval (keyform) page.



TIP:   When cutting/pasting code from the forum, use a good text editor like BBEdit to look for stray invisible junk characters.



It took a great deal of time to post this modification here so I hope you like it and I'd be very appreciative for any thoughts or comments.  Thank-you.   Smiley



New Companion Modification ->

Customer Ticket List for Operators
« Last Edit: July 02, 2008, 01:47:35 PM by Sparky » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Amateurfool
Jr. Member
**

Karma: 3
Posts: 75



View Profile
« Reply #5 on: October 08, 2007, 10:41:46 AM »

It certainly looks good, once i get some spare time i will give it a whirl and see what happens.
Logged

"You hit me. Picard never hit me."

If you post here requesting help, please come back and let us know if you solve the problem.
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #6 on: October 19, 2007, 11:42:36 PM »

If you hit the "cancel" button from within a ticket when NOT logged in, you're taken to the "new ticket" form.

But when using this mod you'd want to be taken to the new Customer Ticket List instead.

The following will make that happen...



In TTXTicket.pm, in the ticket section...

Find this...

Quote
  if ($query->param('cancel') ne undef) {
    if ($query->param('sid') ne undef) {
      $query->param(-name => 'tid', -value=> '');
      $query->param(-name => 'do', -value=> '');
      return 'helpdesk';
    } else {
      if ($query->param('emailkey') ne undef) {
        return 'mytickets';
      } else {
        return 'newticket';
      }
    }
  }

replace it with this...

Quote
if ($query->param('cancel') ne undef) {
    if ($query->param('tid') eq $query->param('key')) {
    $query->param(-name => 'tid', -value=> '');
    $query->param(-name => 'do', -value=> '');
    return 'helpdesk';
    } else {
        if ($query->param('emailkey') ne undef) {
            $query->param(-name => 'email', -value=> $query->param('emailkey'));
            return 'custdesk';
        } else {
            return 'newticket';
        }
    }
}

In the ticket.html template...

change value of "emailkey" within the "newticket" <form></form> to the code in red.

Quote
<input type="hidden" name="emailkey" value="(%TICKET_email%)">
« Last Edit: October 20, 2007, 05:37:12 PM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
brad.forbes
Newbie
*

Karma: 0
Posts: 40



View Profile
« Reply #7 on: October 31, 2007, 10:20:53 AM »

First, let me say this is a great idea for a modification! It's the exact solution my team is looking for to provide on-going service to another group within the company who has multiple tickets to monitor.

Now for the bad news... I'm running TTX rev. 2.24.431 MySQL Edition on IIS... and I have carefully followed the instructions (twice) but I continue to get an error when I look at "My Tickets". The error is "CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers."

To get to the error, I open an existing ticket with the Access Key (not logged in), then click "My Tickets" in the header.

I'm not sure if it's related, but the instructions refer to editing "header.html" and in my version the file is named "header.shtml".

Thanks in advance for any help you can provide!!!
Logged
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #8 on: October 31, 2007, 10:46:42 AM »

That was a typo... there is no template called header.html.

I fixed it.  It's header.shtml but that's not really the cause of your problem, is it?

Did you upload the new module as Ascii text and change permissions to 755?

Let me think about it...
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
brad.forbes
Newbie
*

Karma: 0
Posts: 40



View Profile
« Reply #9 on: October 31, 2007, 10:53:07 AM »

I just copied the files to a share I have mapped to my workstation. And I should have mentioned it's running on Windows 2003 server. Thanks for the quick reply!! I would like to try your Ticket merge modifacation too once I resolve this issue.
Logged
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #10 on: October 31, 2007, 10:56:54 AM »

Is there anything useful in the server logs regarding this error?
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
brad.forbes
Newbie
*

Karma: 0
Posts: 40



View Profile
« Reply #11 on: October 31, 2007, 11:12:01 AM »

Unfortunately no. Nothing of interest about the error at all.
Logged
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #12 on: October 31, 2007, 11:23:14 AM »

I found out that IIS does not like the environment variable I'm using in TTXCustDesk.pm...

Find this...

Quote
my $qstring = $ENV{REQUEST_URI};

and change to this...

Quote
my $qstring = $ENV{QUERY_STRING};


If it works, I'll upload an updated zip file.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
brad.forbes
Newbie
*

Karma: 0
Posts: 40



View Profile
« Reply #13 on: October 31, 2007, 11:32:42 AM »

Sorry, that didn't work. I still get the error "CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers." when I click "My Tickets".
Logged
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #14 on: October 31, 2007, 11:41:01 AM »

Look at the browser source code of the "My Tickets" link from a ticket page when logged in as a customer and post it here.

Also, when you are logged in as an operator, does everything seem to work as normal?


(I'm sorry about the hassles but I don't have a Windows Server myself.)
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Pages: [1] 2 3 ... 6
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.034 seconds with 20 queries.