StockAnswers Addin, Abuse, and dead ticket purging

Hey gang,

Just a quick question…anyone ever used the contributed StockAnswers addin?
I was just setting it up, and it’s quite neat (as to why I’ll explain in a
sec), but I was curious…any way to insert a blank line in them? I made up
some stock answers, and it seems to crap out as soon as it hits a blank
line. (Robert Spier? You here?) :slight_smile:

Also…anyone know what happened to the script that used to be in contrib
for purging dead tickets out of the db? I used to have it on my
developmental RT system, but then I had to reformat it…

And the third thing. One of the main reasons we use RT is because of our
abuse department, so I’m coming up with a whole howto for setting up RT for
abuse. I’m coming up with default scrips, etc etc…so if you have anything
to contribute, let me know and I’ll add it in. I should have an alpha
version up in the next week or two. (I’m also working on enduser
documentation for RT that I’ll be contributing to the main RT project!)

Thanks!

-Rob.

Were also using it. I found the same thing, I worked around it by adding \n at the end of lines or in the spaces. It seams to work
but I’m sure it’s a hack.

example
Hi There,\nWhat time is it?\nGreg

will read as,
Hi There,
What time is it?
Greg

Greg
Greg Dickerson
Support Manager
O’Reilly & Associates, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
Phone:(707)827-7215----- Original Message -----
From: “Rob Mitzel” rmitzel@peer1.net
To: rt-users@lists.fsck.com
Sent: Tuesday, January 15, 2002 7:51 AM
Subject: [rt-users] StockAnswers Addin, Abuse, and dead ticket purging.

Hey gang,

Just a quick question…anyone ever used the contributed StockAnswers addin?
I was just setting it up, and it’s quite neat (as to why I’ll explain in a
sec), but I was curious…any way to insert a blank line in them? I made up
some stock answers, and it seems to crap out as soon as it hits a blank
line. (Robert Spier? You here?) :slight_smile:

Also…anyone know what happened to the script that used to be in contrib
for purging dead tickets out of the db? I used to have it on my
developmental RT system, but then I had to reformat it…

And the third thing. One of the main reasons we use RT is because of our
abuse department, so I’m coming up with a whole howto for setting up RT for
abuse. I’m coming up with default scrips, etc etc…so if you have anything
to contribute, let me know and I’ll add it in. I should have an alpha
version up in the next week or two. (I’m also working on enduser
documentation for RT that I’ll be contributing to the main RT project!)

Thanks!

-Rob.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Hey gang,

Just a quick question…anyone ever used the contributed StockAnswers addin?
I was just setting it up, and it’s quite neat (as to why I’ll explain in a
sec), but I was curious…any way to insert a blank line in them? I made up
some stock answers, and it seems to crap out as soon as it hits a blank
line. (Robert Spier? You here?) :slight_smile:

Yeah… to fix that I wrote a small shell script to reformat the stock
answers that the queue admins give me:

ls | while read file
do
cat “$file” | sed -e “s/^M//g” | fmt | sed -e “s/^$/ /” -e “s/[<>]/#/” > “$file.new”
rm “$file”
mv “$file.new” “$file”
done

(note that ^M shouldn’t just be cut-and-pasted).

T�o de Hesselle, “Everything should be made as simple
Unix Systems Administrator as possible, but not simpler.”
– Albert Einstein
University of Technology, Sydney

“Rob Mitzel” wrote:

Hey gang,

Just a quick question…anyone ever used the contributed StockAnswers addin?
I was just setting it up, and it’s quite neat (as to why I’ll explain in a
sec), but I was curious…any way to insert a blank line in them? I made up
some stock answers, and it seems to crap out as soon as it hits a blank
line. (Robert Spier? You here?) :slight_smile:

I had the same problems and solved it by a slight modification of
StockAnswers.html. At the end of this file you have:

for my $n (@templates) {
open(IN,“<$n”) or next;
local $/ = “”;
my $t = ;
$n =~ s{^.+/(.+?)/(.+?)$}{$1:$2};
push @data, [$n,$t];
}

which I modified to

for my $n (@templates) {
open(IN,“<$n”) or next;
local $/ = “”;
my $t = join(‘’, ); $t =~ s/\n/\n/gs; $t =~ s/'/\'/gs;
$n =~ m{^.+/(.+?)/(.+?)$}; my ($dir,$name) = ($1,$2);
if ($t =~ s/^$title:\s*(.+?)\n//) { $name = $1; }
$n = “$dir:$name”;
push @data, [$n,$t];
}

Since I didn’t like filenames as titles of answers, this patched version
looks for a line of the form

$title: title of this answer

in sets the title of the answer accordingly. If there’s no ‘$title:’
line in the file, it still uses the name of the file in the list of
available answers.

Regards,
Gorazd