From dima at rt.ru Tue Aug 1 02:26:45 2000 From: dima at rt.ru (Dmitry S. Rzhavin) Date: Tue, 01 Aug 2000 10:26:45 +0400 Subject: [rt-users] subject recoding Message-ID: <39866DA5.85029865@rt.ru> Hi! I have some problems with subject recoding: when someone sends mail to RT with russian letters in "subject" field, RT displays it as "=?koi8-r?B?wi3aIDI1NQ==?=" for example. As far as I know such subject encoding is allowed in RFC. Can You please insert some decoder into RT mail gate? PS: This is Request Tracker version 1.0.2. From farpoint at fpoint.com Tue Aug 1 17:39:46 2000 From: farpoint at fpoint.com (FarPoint Technologies) Date: Tue, 01 Aug 2000 17:39:46 -0400 Subject: [rt-users] Way to control number of results? Message-ID: <4.3.2.7.2.20000801173811.020a6490@pop.mindspring.com> Is there any patch available that will let you limit results by date? Something that would let my users do a "show me all my closed issues less than 30 days old"? Thanks, Brian ------------------------------------------------------ FarPoint Technologies Phones: Tech Supt. - 919-460-1887 Sales - 800-645-5913 Main - 919-460-4551 FTP - ftp.fpoint.com /fpoint.com WEB - www.fpoint.com Sales email: fpsales at fpoint.com Technical support: fpsupport at fpoint.com ------------------------------------------------------- From tims at hitzfm.org.au Wed Aug 2 01:22:04 2000 From: tims at hitzfm.org.au (Tim Syratt) Date: Wed, 2 Aug 2000 15:22:04 +1000 (EST) Subject: [rt-users] Undefined Subroutine. In-Reply-To: Message-ID: Hi Aagain, Thanks everybody for your help. I guess I was just having one of those days where I really should have stayed in bed :-) Finally got it all installed and working very well - I'm still to get the mailgate running but I saw the doco's for this and anticipate minimal problems getting it going. Thanks again to everyone for your help. ------------------------------------------------------------ Tim Syratt tims at hitzfm.org.au Dept. Head - Technical 0409 017 172 89.9 HitzFM Broadcasters Inc. WWW.HITZFM.ORG.AU ------------------------------------------------------------ On Mon, 31 Jul 2000, Tim Syratt wrote: > Hi, > > I've found some info on this in the FAQ, but I think this may be a > slightly different problem. > > Undefined subroutine CGI::Vars > [Mon Jul 31 14:54:50 2000] [error] [client 210.15.210.49] Premature end of > script headers: /usr/lib/cgi-bin/rt/webrt.cgi > > I'm not very experienced with CGI modules, so if someone could point me in > the right direction , I would really appreciate it. > > Thanks! > > Kind Regards, > Tim Syratt > > > ------------------------------------------------------------ > Tim Syratt tims at hitzfm.org.au > Dept. Head - Technical 0409 017 172 > 89.9 HitzFM Broadcasters Inc. WWW.HITZFM.ORG.AU > ------------------------------------------------------------ > > > > > _______________________________________________ > rt-users mailing list > rt-users at lists.fsck.com > http://lists.fsck.com/mailman/listinfo/rt-users > From awfief at cs.brandeis.edu Wed Aug 2 06:28:47 2000 From: awfief at cs.brandeis.edu (Sheeri) Date: Wed, 2 Aug 2000 06:28:47 -0400 (EDT) Subject: [rt-users] setting up help Message-ID: Hey there.... In setting up rt, I'm running into a few problems. It installed just fine (thanx for the help Jesse!) but I seem to be having problems with both the web and e-mail gateways (argh....doncha just hate that?). I was able to create users and queues through the command line.... When I try to access http://localhost/rt/webrt.cgi I get an internal server error. Not very helpful...the server error logs say, Can't locate /opt/rt/etc/config.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 /opt/rt/lib) at /opt/rt/bin/rtmux.pl line 20. [Wed Aug 2 10:24:28 2000] [error] [client 127.0.0.1] Premature end of script headers: /opt/rt/bin/cgi/webrt.cgi now, /opt/rt/etc/config.pm exists....do I need to change @INC? (how do I do that, anyway? I seem to recall it's a compile-time thing with make...but it's been so long I forget if I have to cuss three times or five times before it shows mercy on me and works....) When I compose a message to rt, I get the following error: 550 "/opt/rt/bin/rt-mailgate neu correspond"... Can't create output: Permission denied when I type /opt/rt/bin/rt-mailgate neu correspond I get the same "Can't locate /opt/rt/etc/config.pm in @INC " error message.... Thanx in advance for the help! -Sheeri From jesse at fsck.com Wed Aug 2 11:03:36 2000 From: jesse at fsck.com (Jesse) Date: Wed, 2 Aug 2000 11:03:36 -0400 Subject: [rt-users] setting up help In-Reply-To: ; from awfief@cs.brandeis.edu on Wed, Aug 02, 2000 at 06:28:47AM -0400 References: Message-ID: <20000802110336.C15981@pallas.fsck.com> That sounds like a permissions problem. Try running 'make fixperms' On Wed, Aug 02, 2000 at 06:28:47AM -0400, Sheeri wrote: > Hey there.... > > In setting up rt, I'm running into a few problems. It installed just fine > (thanx for the help Jesse!) but I seem to be having problems with both the > web and e-mail gateways (argh....doncha just hate that?). I was able to > create users and queues through the command line.... > > When I try to access > http://localhost/rt/webrt.cgi > > I get an internal server error. Not very helpful...the server error logs > say, > > Can't locate /opt/rt/etc/config.pm in @INC (@INC > contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 > /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 > /opt/rt/lib) at /opt/rt/bin/rtmux.pl line 20. > [Wed Aug 2 10:24:28 2000] [error] [client 127.0.0.1] Premature end of > script headers: /opt/rt/bin/cgi/webrt.cgi > > now, /opt/rt/etc/config.pm exists....do I need to change @INC? (how do I > do that, anyway? I seem to recall it's a compile-time thing with > make...but it's been so long I forget if I have to cuss three times or > five times before it shows mercy on me and works....) > > When I compose a message to rt, I get the following error: > > 550 "/opt/rt/bin/rt-mailgate neu correspond"... Can't create > output: Permission denied > > when I type /opt/rt/bin/rt-mailgate neu correspond I get the same "Can't > locate /opt/rt/etc/config.pm in @INC " error message.... > > Thanx in advance for the help! > > -Sheeri > > > > _______________________________________________ > rt-users mailing list > rt-users at lists.fsck.com > http://lists.fsck.com/mailman/listinfo/rt-users > -- jesse reed vincent --- root at eruditorum.org --- jesse at fsck.com pgp keyprint: 50 41 9C 03 D0 BC BC C8 2C B9 77 26 6F E1 EB 91 ------------------------------------------------------------- pretty soon we're going to HAVE to have hypertext mail! --Tim Berners Lee. (8 Jan 1993 on www-talk) From rmillis at enel.ucalgary.ca Wed Aug 2 11:05:44 2000 From: rmillis at enel.ucalgary.ca (Randy Millis) Date: Wed, 02 Aug 2000 09:05:44 -0600 Subject: [rt-users] Batch resolve? Message-ID: <398838C7.589D01CC@enel.ucalgary.ca> Can I batch resolve 55 duplicate tickets someone has opened? -- Randy Millis Network Administrator Electrical and Computer Engineering University of Calgary 2500 University Dr. N.W. Calgary, Alberta Canada T2N 1N4 Tel: 403-220-4864 Fax: 403-282-6855 rmillis at enel.ucalgary.ca http://www.enel.ucalgary.ca/ ======================================================================= If you are making an Electrical and Computer Engineering Department help or service request please use the web form at http://www.enel.ucalgary.ca/prssform.html or e-mail help at enel.ucalgary.ca. ======================================================================= From jesse at fsck.com Wed Aug 2 11:06:54 2000 From: jesse at fsck.com (Jesse) Date: Wed, 2 Aug 2000 11:06:54 -0400 Subject: [rt-users] Batch resolve? In-Reply-To: <398838C7.589D01CC@enel.ucalgary.ca>; from rmillis@enel.ucalgary.ca on Wed, Aug 02, 2000 at 09:05:44AM -0600 References: <398838C7.589D01CC@enel.ucalgary.ca> Message-ID: <20000802110654.D15981@pallas.fsck.com> I'd suggest a small shell script around the commandline 'rt' tool. On Wed, Aug 02, 2000 at 09:05:44AM -0600, Randy Millis wrote: > Can I batch resolve 55 duplicate tickets someone has opened? > > -- > Randy Millis > Network Administrator > Electrical and Computer Engineering > University of Calgary > 2500 University Dr. N.W. > Calgary, Alberta > Canada T2N 1N4 > Tel: 403-220-4864 Fax: 403-282-6855 > rmillis at enel.ucalgary.ca > http://www.enel.ucalgary.ca/ > > ======================================================================= > If you are making an Electrical and Computer Engineering Department > help or service request please use the web form at > http://www.enel.ucalgary.ca/prssform.html or e-mail > help at enel.ucalgary.ca. > ======================================================================= > > > > > _______________________________________________ > rt-users mailing list > rt-users at lists.fsck.com > http://lists.fsck.com/mailman/listinfo/rt-users > -- jesse reed vincent --- root at eruditorum.org --- jesse at fsck.com pgp keyprint: 50 41 9C 03 D0 BC BC C8 2C B9 77 26 6F E1 EB 91 ------------------------------------------------------------- Transporters are so ungodly. if god had wanted us to travel great distances instantaneously, he would have given us an internal materialisation/dematerialisation control. -- Shoshe Cole From awfief at cs.brandeis.edu Wed Aug 2 11:17:33 2000 From: awfief at cs.brandeis.edu (Sheeri) Date: Wed, 2 Aug 2000 11:17:33 -0400 (EDT) Subject: [rt-users] setting up help In-Reply-To: <20000802110336.C15981@pallas.fsck.com> Message-ID: On Wed, 2 Aug 2000, Jesse wrote: > That sounds like a permissions problem. Try running 'make fixperms' Right. Aha. The trick was not to cuss at all. Thanx Jesse! -Sheeri From detertj at msoe.edu Wed Aug 2 11:23:48 2000 From: detertj at msoe.edu (Jonathan Detert) Date: Wed, 2 Aug 2000 10:23:48 -0500 Subject: [rt-users] Batch resolve? In-Reply-To: <398838C7.589D01CC@enel.ucalgary.ca>; from rmillis@enel.ucalgary.ca on Wed, Aug 02, 2000 at 09:05:44AM -0600 References: <398838C7.589D01CC@enel.ucalgary.ca> Message-ID: <20000802102348.I2524@nurd.msoe.edu> * Randy Millis [000802 09:55]: > Can I batch resolve 55 duplicate tickets someone has opened? I'm guessing not with the web-ui. Maybe the cl-ui (command-line user interface). Otherwise, connect to mysql and whip up some sql statements to do the work. Then, you could even outright delete the dups, as opposed to resolving 'em all. From erin at cybertrails.com Wed Aug 2 14:05:21 2000 From: erin at cybertrails.com (Erin Martin) Date: Wed, 2 Aug 2000 11:05:21 -0700 Subject: [rt-users] Reply to Ticket, reopens Resolved Messages...Over and over and over again Message-ID: <20000802110521.A8740@cybertrails.com> We are using RT with qmail as our mail backend. Recently, after a new install, we have had an issue that we can't seem to figure out. Not sure if its RT or Qmail or somewhere in the middle. The Issue is: Whenever a resolved ticket is responded to, it opens it back up, no matter how many times it is resolved, it continues to repeat the last message over and over again. Changing the original subject stops it, but isn't a fix. If anyone has had this problem, please let me know if you have fixed it and whether it is in RT or Qmail. Thank you Erin Martin System Administrator Cybertrails -- ------------------------------------------------------------------ Erin Martin - Cyber Trails Phone - (602)906-1761 System Administrator Pager - (602)521-2356 erin at cybertrails.com Fax - (602)906-1799 * Dark Jedi of the Sysadmin Sith Darth Rpmminusedashdashnodeps * erin at sysadminsith.org ------------------------------------------------------------------ From rmillis at enel.ucalgary.ca Thu Aug 3 11:40:06 2000 From: rmillis at enel.ucalgary.ca (Randy Millis) Date: Thu, 03 Aug 2000 09:40:06 -0600 Subject: [rt-users] Duplicate tickets? Message-ID: <39899256.2116293C@enel.ucalgary.ca> Anyone ever have RT open up duplicate tickets? The user claims to have sent only one request. Any ideas on how I can troubleshoot this? -- Randy Millis Network Administrator Electrical and Computer Engineering University of Calgary 2500 University Dr. N.W. Calgary, Alberta Canada T2N 1N4 Tel: 403-220-4864 Fax: 403-282-6855 rmillis at enel.ucalgary.ca http://www.enel.ucalgary.ca/ ======================================================================= If you are making an Electrical and Computer Engineering Department help or service request please use the web form at http://www.enel.ucalgary.ca/prssform.html or e-mail help at enel.ucalgary.ca. ======================================================================= From jesse at fsck.com Thu Aug 3 11:55:18 2000 From: jesse at fsck.com (Jesse) Date: Thu, 3 Aug 2000 11:55:18 -0400 Subject: [rt-users] Duplicate tickets? In-Reply-To: <39899256.2116293C@enel.ucalgary.ca>; from rmillis@enel.ucalgary.ca on Thu, Aug 03, 2000 at 09:40:06AM -0600 References: <39899256.2116293C@enel.ucalgary.ca> Message-ID: <20000803115518.B24996@pallas.fsck.com> I'd suggest looking at the sendmail logs. See if two seperate messages came in. Look at the message headers in the tickets. see if they have different message ids. -j On Thu, Aug 03, 2000 at 09:40:06AM -0600, Randy Millis wrote: > Anyone ever have RT open up duplicate tickets? The user claims to have > sent only one request. Any ideas on how I can troubleshoot this? > > -- > Randy Millis > Network Administrator > Electrical and Computer Engineering > University of Calgary > 2500 University Dr. N.W. > Calgary, Alberta > Canada T2N 1N4 > Tel: 403-220-4864 Fax: 403-282-6855 > rmillis at enel.ucalgary.ca > http://www.enel.ucalgary.ca/ > > ======================================================================= > If you are making an Electrical and Computer Engineering Department > help or service request please use the web form at > http://www.enel.ucalgary.ca/prssform.html or e-mail > help at enel.ucalgary.ca. > ======================================================================= > > > > > _______________________________________________ > rt-users mailing list > rt-users at lists.fsck.com > http://lists.fsck.com/mailman/listinfo/rt-users > -- jesse reed vincent --- root at eruditorum.org --- jesse at fsck.com pgp keyprint: 50 41 9C 03 D0 BC BC C8 2C B9 77 26 6F E1 EB 91 ------------------------------------------------------------- Linux is like a Vorlon. It is incredibly powerful, gives terse, cryptic answers and has a lot of things going on in the background. From virginia at texterity.com Thu Aug 3 12:15:49 2000 From: virginia at texterity.com (Virginia Beauregard) Date: Thu, 3 Aug 2000 12:15:49 -0400 (EDT) Subject: [rt-users] Re: Reply to Ticket, reopens Resolved Messages In-Reply-To: <20000803160003.4911130E90C@fsck.com> Message-ID: > From: Erin Martin > Subject: [rt-users] Reply to Ticket, reopens Resolved Messages...Over and over and over again > > Whenever a resolved ticket is responded to, it opens it back up, no > matter how many times it is resolved, it continues to repeat the last > message over and over again. Changing the original subject stops it, > but isn't a fix. This isn't a bug; it's how RT is implemented. If someone is commenting on a ticket, it should not be closed in the ticketing system, because the issue has clearly not been "resolved" yet. -- Virginia J. Beauregard virginia at texterity.com UNIX Systems and Network Administrator Texterity, Inc. From tims at hitzfm.org.au Fri Aug 4 01:20:09 2000 From: tims at hitzfm.org.au (Tim Syratt) Date: Fri, 4 Aug 2000 15:20:09 +1000 (EST) Subject: [rt-users] Duplicate tickets? In-Reply-To: <39899256.2116293C@enel.ucalgary.ca> Message-ID: Did it come in through email or from a webui? from my experience, users constantly accidently double click SEND which creates two ticket ids.. this would be supported by checking the id numbers, ie, ticket 1 is 64224 and the second one is 64225 then you can just about put money on where the problem comes from.. if its from email.. then I'm not really sure, check mail logs and ensure their not CC'ing it or something basic like that.. HTH. ------------------------------------------------------------ Tim Syratt tims at hitzfm.org.au Dept. Head - Technical 0409 017 172 89.9 HitzFM Broadcasters Inc. WWW.HITZFM.ORG.AU ------------------------------------------------------------ On Thu, 3 Aug 2000, Randy Millis wrote: > Anyone ever have RT open up duplicate tickets? The user claims to have > sent only one request. Any ideas on how I can troubleshoot this? > > -- > Randy Millis > Network Administrator > Electrical and Computer Engineering > University of Calgary > 2500 University Dr. N.W. > Calgary, Alberta > Canada T2N 1N4 > Tel: 403-220-4864 Fax: 403-282-6855 > rmillis at enel.ucalgary.ca > http://www.enel.ucalgary.ca/ > > ======================================================================= > If you are making an Electrical and Computer Engineering Department > help or service request please use the web form at > http://www.enel.ucalgary.ca/prssform.html or e-mail > help at enel.ucalgary.ca. > ======================================================================= > > > > > _______________________________________________ > rt-users mailing list > rt-users at lists.fsck.com > http://lists.fsck.com/mailman/listinfo/rt-users > From rotman at inode.at Fri Aug 4 15:47:20 2000 From: rotman at inode.at (robert rotman) Date: Fri, 4 Aug 2000 21:47:20 +0200 (CEST) Subject: [rt-users] Undefined subroutine Message-ID: Hi all, I'v tried to install rt2.0 and i got 2 errors: 1.) I was unable to create the field int table "Transactions" with the name "Data" within mysql 3.22. every variations work "Data1, DataX..." but not Data. upgrading to 3.23 solved this problem. 2.) I got the error: "[error] Undefined subroutine &HTML::Mason::handler called." (webmux.pl is called from PerlRequire and has a subroutine calld "handler") how can i debug this? robert --- di. robert rotman inode.graz phone -> ++43-(0)316 813141 ++43-(0)316 818600/15 <- fax rotman at inode.at http://www.graz.inode.at/ -- this letter was written on recycled bytes used by deleted mail. From jesse at fsck.com Fri Aug 4 15:51:06 2000 From: jesse at fsck.com (Jesse) Date: Fri, 4 Aug 2000 15:51:06 -0400 Subject: [rt-users] Undefined subroutine In-Reply-To: ; from rotman@inode.at on Fri, Aug 04, 2000 at 09:47:20PM +0200 References: Message-ID: <20000804155106.B9225@pallas.fsck.com> Be forewarned that rt2 isn't stable yet. What rev of the RT2 dev code are you using? On Fri, Aug 04, 2000 at 09:47:20PM +0200, robert rotman wrote: > > Hi all, > > I'v tried to install rt2.0 and i got 2 errors: > > 1.) I was unable to create the field int table "Transactions" > with the name "Data" within mysql 3.22. > every variations work "Data1, DataX..." but not Data. > upgrading to 3.23 solved this problem. Hrm. We may end up needing to change the datatype. though mysql 3.23 may also be a requirement > > 2.) I got the error: > "[error] Undefined subroutine &HTML::Mason::handler called." > (webmux.pl is called from PerlRequire and has a subroutine > calld "handler") > how can i debug this? > can you show us the apropriate stanza of your apache config file? Mine looks like this: DocumentRoot /opt/rt-1.3/WebRT/html ServerName localhost ServerAlias mason PerlRequire /opt/rt-1.3/bin/webmux.pl SetHandler perl-script PerlHandler RT::Mason > > robert > > --- > di. robert rotman inode.graz > phone -> ++43-(0)316 813141 ++43-(0)316 818600/15 <- fax > rotman at inode.at http://www.graz.inode.at/ > -- > this letter was written on recycled bytes used by deleted mail. > > > > > _______________________________________________ > rt-users mailing list > rt-users at lists.fsck.com > http://lists.fsck.com/mailman/listinfo/rt-users > -- jesse reed vincent --- root at eruditorum.org --- jesse at fsck.com pgp keyprint: 50 41 9C 03 D0 BC BC C8 2C B9 77 26 6F E1 EB 91 ------------------------------------------------------------- "If IBM _wanted_ to make clones, we could make them cheaper and faster than anyone else!" - An IBM Rep. visiting Vassar College's Comp Sci Department. From rotman at inode.at Fri Aug 4 16:22:32 2000 From: rotman at inode.at (robert rotman) Date: Fri, 4 Aug 2000 22:22:32 +0200 (CEST) Subject: [rt-users] Undefined subroutine In-Reply-To: <20000804155106.B9225@pallas.fsck.com> Message-ID: > > > > 1.) I was unable to create the field int table "Transactions" > > with the name "Data" within mysql 3.22. > > every variations work "Data1, DataX..." but not Data. > > upgrading to 3.23 solved this problem. > > Hrm. We may end up needing to change the datatype. though mysql 3.23 > may also be a requirement > it was ounly for your information... > > SetHandler perl-script > PerlHandler RT::Mason > thank you, i'm not quite familiar with those perl-hendlers:( iv got "PerlHandler HTML::Mason" from the README... maby you should change this to avoid email-traffic;) one mor question which i should maby ask in the apache mailinglist: when i go to the html-directory i got all references to the main host not to the vhost. eg: action="http://my.main.host//webrt//Ticket/Display.html so the whole thing dosnt work:( do you know where to change this? robert From jesse at fsck.com Fri Aug 4 16:28:53 2000 From: jesse at fsck.com (Jesse) Date: Fri, 4 Aug 2000 16:28:53 -0400 Subject: [rt-users] Undefined subroutine In-Reply-To: ; from rotman@inode.at on Fri, Aug 04, 2000 at 10:22:32PM +0200 References: <20000804155106.B9225@pallas.fsck.com> Message-ID: <20000804162853.D9225@pallas.fsck.com> > > > > > > 1.) I was unable to create the field int table "Transactions" > > > with the name "Data" within mysql 3.22. > > > every variations work "Data1, DataX..." but not Data. > > > upgrading to 3.23 solved this problem. > > > > Hrm. We may end up needing to change the datatype. though mysql 3.23 > > may also be a requirement > > > > it was ounly for your information... > It's good to know! Thanks! > > > > SetHandler perl-script > > PerlHandler RT::Mason > > > > > thank you, > i'm not quite familiar with those perl-hendlers:( > > iv got "PerlHandler HTML::Mason" from the README... > maby you should change this to avoid email-traffic;) What version of the RT2 distribution are you running? Current READMEs say RT::Mason. At least I think they do :/ > > one mor question which i should maby ask in the apache mailinglist: > > when i go to the html-directory i got all references to the main host not > to the vhost. > eg: > type="text/css"> > action="http://my.main.host//webrt//Ticket/Display.html > That's an undocumented bit in the config.pm that I've never touched and need to redo. look for "WebRT Configuration" in etc/config.pm and replace the variables as apropriate. -j > so the whole thing dosnt work:( > > do you know where to change this? > > > robert > > -- jesse reed vincent --- root at eruditorum.org --- jesse at fsck.com pgp keyprint: 50 41 9C 03 D0 BC BC C8 2C B9 77 26 6F E1 EB 91 ------------------------------------------------------------- Transporters are so ungodly. if god had wanted us to travel great distances instantaneously, he would have given us an internal materialisation/dematerialisation control. -- Shoshe Cole From marc at popularpower.com Sat Aug 5 22:30:03 2000 From: marc at popularpower.com (Marc Hedlund) Date: Sat, 5 Aug 2000 19:30:03 -0700 (PDT) Subject: [rt-users] Tool for canned responses Message-ID: We use RT to track feedback on our site. We often get frequently asked questions (despite a FAQ list...) and want to quickly respond to them. I wrote a utility to use JavaScript to insert a set of canned responses into the reply form in RT, and thought it might be useful to others. It will require a little configuration, which is documented in comments at the head of the script. Basically you make a directory of canned responses, where the first line of each file is a description, and the rest is the response. Then run the script, and modify one line of rt/lib/rt/ui/web/forms.pm to point to the generated JavaScript file. That's all it should take. Let me know if you have suggestions or wind up using this. Enjoy. -Marc Give your computer something to dream about. (tm) Popular Power - www.popularpower.com -------------- next part -------------- #!/usr/bin/perl -w # cannery - produce a JavaScript file to insert canned responses for RT # Copyright (c) 2000 Marc Hedlund ########### # LICENSE # ########### # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA ################ # INSTRUCTIONS # ################ # This script auto-generates a JavaScript file (canned.js) to write a # 'select' pop-up menu into the RT reply form, from which an RT queue # member can select a canned response to insert into the reply # textarea. (See for more about # RT.) Canned responses are read from a set of plaintext files in the # firectory named by $formdir, below. These files should be written # so that the first line describes the canned response -- this is the # line that will be shown in the pop-up menu. The rest of the file is # the response itself, which will be inserted into the top of the # reply textarea. # # Running this script will write the JavaScript file into the $basedir # directory specified below, which should be a directory in the # document root of the Web server running RT. Once that is done, # insert the following line at line 378 rt/lib/rt/ui/web/forms.pm # (relative to the rt home directory), just above the textarea tag: # # # # where "/etc/rt/canned.js" points to the file generated by running # this script, starting at the document root of the Web server. # # That's all you should have to do to install canned responses. When # you come up with more to add, just drop them in the 'uncanned' # directory and re-run 'cannery' -- they will be added immediately. # # If you have comments or suggestions about this script, please let me # know. Thanks! --Marc Hedlund use strict; use diagnostics; my $basedir = "/home/www/in.popularpower.com/etc/rt"; my $formdir = "$basedir/uncanned"; open(INSERT, ">$basedir/canned.js") or die "Unable to write to canned.js: $!\n"; print INSERT &header(); opendir(FORMS, "$formdir") or die "Unable to read $formdir: $!\n"; my @formletters = grep { $_ ne '.' and $_ ne '..' } readdir FORMS; closedir FORMS; my $bodyformat = <<'FORMAT'; ~~ "^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< " + FORMAT for (my $idx = 0; $idx < scalar(@formletters); $idx++) { my $formfile = $formletters[$idx]; open(FORM, "$formdir/$formfile") or warn "Unable to open $formfile: $!\n"; my $linecount = ''; my @formlines = map { if ($_ =~ /\w/) { $linecount++; chomp $_; $_ =~ s/\"/\\\"/g; $_ . " "; } elsif ($linecount > 1) { '\n\n'; } else { ''; } }
; close FORM; my $question = shift @formlines; my $answer = join('', @formlines); my $formanswer = swrite($bodyformat, $answer); $question =~ s/\s+$//; $formanswer =~ s/\s+\"\s\+\s*$/\ \"\ \+/mg; print qq(Writing template "$question"...\n); print INSERT "new template(\"$formfile\", \"$question\",\n$formanswer\n"; print INSERT ' "\n\n");' . "\n\n"; } while (my $line = ) { print INSERT $line; } sub swrite { my $format = shift; $^A = ""; formline($format, @_); return $^A; } sub header { return <<'HEADER'; /* * This file is auto-generated by the "cannery" script. * Please don't edit this file -- edit the "cannery" script and * re-run it instead. If you want to enter a new template, just put a * new plaintext file in the "formletters" directory, where the first * line is the question to be answered, and the rest of the lines are * the answer. * * "cannery" written by Marc Hedlund */ /* * Set up data structures */ var questions = new Object(); var answers = new Object(); /* * Build the canned response entries. These are drawn from the * "uncanned" directory. */ HEADER } __DATA__ /* * This is the closing line that will be inserted at the bottom of * every template. */ var closing = "Thanks very much for taking the time to write to us!\n\n"; /* * Nothing below here should be changed in the usual case -- this is * just the 'guts'. If you do make changes below that you think would * be generally useful, let me know! */ // Write out the select tag and the embedded option tags. writeMenu(); // Functions, called above or from the HTML page. /* * Adds an entry to the canned response collection. */ function template(key, question, answer) { questions[key] = question; answers[key] = answer; } /* * Writes a menu of canned responses into the current HTML page */ function writeMenu() { document.writeln('
\n\n"); } /* * Inserts a canned response selected by the user into the reply * textarea. */ function insert(textarea, select) { for (var i = 0; i < select.options.length; i++) { var option = select.options[i]; if (option.selected && option.value != "none") { textarea.value = answers[option.value] + closing + textarea.value; } } } From wozz+rt at wookie.net Sun Aug 6 01:12:06 2000 From: wozz+rt at wookie.net (Wozz) Date: Sat, 5 Aug 2000 23:12:06 -0600 Subject: [rt-users] Tool for canned responses In-Reply-To: References: Message-ID: <20000805231206.L24811@luvewe.bonch.org> Great job! Only one problem I've found. When I select a response, I get the following javascript error and nothing is written to the test area: Line: 34 Char: 1 Error: 'document.reply.content' is not an object Code: 0 I know nothing about javascript, but I assume this is supposed to be the pre-existing content of the reply textarea, but I don't see where you get that data from initially. Any ideas? On Sat, Aug 05, 2000 at 07:30:03PM -0700, Marc Hedlund wrote: > > We use RT to track feedback on our site. We often get frequently asked > questions (despite a FAQ list...) and want to quickly respond to them. I > wrote a utility to use JavaScript to insert a set of canned responses into > the reply form in RT, and thought it might be useful to others. > > It will require a little configuration, which is documented in comments at > the head of the script. Basically you make a directory of canned > responses, where the first line of each file is a description, and the > rest is the response. Then run the script, and modify one line of > rt/lib/rt/ui/web/forms.pm to point to the generated JavaScript > file. That's all it should take. > > Let me know if you have suggestions or wind up using this. Enjoy. > > -Marc > > Give your computer something to dream about. (tm) > Popular Power - www.popularpower.com > Content-Description: cannery - perl RT utility > #!/usr/bin/perl -w > > # cannery - produce a JavaScript file to insert canned responses for RT > # Copyright (c) 2000 Marc Hedlund > > ########### > # LICENSE # > ########### > > # This program is free software; you can redistribute it and/or modify > # it under the terms of the GNU General Public License as published by > # the Free Software Foundation; either version 2 of the License, or > # (at your option) any later version. > # > # This program is distributed in the hope that it will be useful, but > # WITHOUT ANY WARRANTY; without even the implied warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > # General Public License for more details. > # > # You should have received a copy of the GNU General Public License > # along with this program; if not, write to the Free Software > # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 > # USA > > ################ > # INSTRUCTIONS # > ################ > > # This script auto-generates a JavaScript file (canned.js) to write a > # 'select' pop-up menu into the RT reply form, from which an RT queue > # member can select a canned response to insert into the reply > # textarea. (See for more about > # RT.) Canned responses are read from a set of plaintext files in the > # firectory named by $formdir, below. These files should be written > # so that the first line describes the canned response -- this is the > # line that will be shown in the pop-up menu. The rest of the file is > # the response itself, which will be inserted into the top of the > # reply textarea. > # > # Running this script will write the JavaScript file into the $basedir > # directory specified below, which should be a directory in the > # document root of the Web server running RT. Once that is done, > # insert the following line at line 378 rt/lib/rt/ui/web/forms.pm > # (relative to the rt home directory), just above the textarea tag: > # > # > # > # where "/etc/rt/canned.js" points to the file generated by running > # this script, starting at the document root of the Web server. > # > # That's all you should have to do to install canned responses. When > # you come up with more to add, just drop them in the 'uncanned' > # directory and re-run 'cannery' -- they will be added immediately. > # > # If you have comments or suggestions about this script, please let me > # know. Thanks! --Marc Hedlund > > use strict; > use diagnostics; > > my $basedir = "/home/www/in.popularpower.com/etc/rt"; > my $formdir = "$basedir/uncanned"; > > open(INSERT, ">$basedir/canned.js") > or die "Unable to write to canned.js: $!\n"; > > print INSERT &header(); > > opendir(FORMS, "$formdir") > or die "Unable to read $formdir: $!\n"; > > my @formletters = grep { $_ ne '.' and $_ ne '..' } readdir FORMS; > > closedir FORMS; > > my $bodyformat = <<'FORMAT'; > ~~ "^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< " + > FORMAT > > for (my $idx = 0; $idx < scalar(@formletters); $idx++) { > my $formfile = $formletters[$idx]; > > open(FORM, "$formdir/$formfile") > or warn "Unable to open $formfile: $!\n"; > > my $linecount = ''; > my @formlines = map { > if ($_ =~ /\w/) { > $linecount++; > chomp $_; > $_ =~ s/\"/\\\"/g; > $_ . " "; > } elsif ($linecount > 1) { > '\n\n'; > } else { > ''; > } > } ; > > close FORM; > > my $question = shift @formlines; > my $answer = join('', @formlines); > my $formanswer = swrite($bodyformat, $answer); > > $question =~ s/\s+$//; > $formanswer =~ s/\s+\"\s\+\s*$/\ \"\ \+/mg; > > print qq(Writing template "$question"...\n); > > print INSERT "new template(\"$formfile\", \"$question\",\n$formanswer\n"; > print INSERT ' "\n\n");' . "\n\n"; > } > > while (my $line = ) { > print INSERT $line; > } > > sub swrite { > my $format = shift; > $^A = ""; > formline($format, @_); > return $^A; > } > > sub header { > return <<'HEADER'; > /* > * This file is auto-generated by the "cannery" script. > * Please don't edit this file -- edit the "cannery" script and > * re-run it instead. If you want to enter a new template, just put a > * new plaintext file in the "formletters" directory, where the first > * line is the question to be answered, and the rest of the lines are > * the answer. > * > * "cannery" written by Marc Hedlund > */ > > /* > * Set up data structures > */ > > var questions = new Object(); > var answers = new Object(); > > /* > * Build the canned response entries. These are drawn from the > * "uncanned" directory. > */ > > HEADER > } > > __DATA__ > /* > * This is the closing line that will be inserted at the bottom of > * every template. > */ > > var closing = "Thanks very much for taking the time to write to us!\n\n"; > > /* > * Nothing below here should be changed in the usual case -- this is > * just the 'guts'. If you do make changes below that you think would > * be generally useful, let me know! > */ > > // Write out the select tag and the embedded option tags. > > writeMenu(); > > // Functions, called above or from the HTML page. > > /* > * Adds an entry to the canned response collection. > */ > > function template(key, question, answer) { > questions[key] = question; > answers[key] = answer; > } > > /* > * Writes a menu of canned responses into the current HTML page > */ > > function writeMenu() { > document.writeln('
\n\n"); > } > > /* > * Inserts a canned response selected by the user into the reply > * textarea. > */ > > function insert(textarea, select) { > for (var i = 0; i < select.options.length; i++) { > var option = select.options[i]; > if (option.selected && option.value != "none") { > textarea.value = > answers[option.value] + closing + textarea.value; > } > } > } From marc at popularpower.com Sun Aug 6 01:21:09 2000 From: marc at popularpower.com (Marc Hedlund) Date: Sat, 5 Aug 2000 22:21:09 -0700 (PDT) Subject: [rt-users] Tool for canned responses In-Reply-To: <20000805231206.L24811@luvewe.bonch.org> Message-ID: Hm, maybe I left out something. I bet I know what it is -- you probably have to add name=\"reply\" to the form tag just above the place I said to put the script tag. So, the whole part of forms.pm (lines 373-381) should look like this: ---begin--- print " "; &UpdateOptions(); print "