Re: [rt-users] Dynamic choice of templates based on the value of a CF

2013-09-09 Thread Gene LeDuc
In the past I ended up turning the templates into perl programs.  I made 
all the decisions within the template and then built the output based on 
that logic.  It wasn't very pretty (it was ugly, actually), but it 
worked flawlessly for years.  Gotta be careful with maintenance on the 
templates, though, because a seemingly unrelated change in one part of 
the template sometimes was more related to other parts of the template 
than we thought.


Gene

On 9/6/2013 1:33 PM, Landon Stewart wrote:

On 6 September 2013 11:55, Landon Stewart lstew...@iweb.com
mailto:lstew...@iweb.com wrote:

Actually I believe I found the answer which I'm going to try…  I
basically need a hybrid of these two because we also send different
copies of templates depending on the language the customer prefers
to be communicated with in.

http://requesttracker.wikia.com/wiki/ForkTemplate
http://requesttracker.wikia.com/wiki/ChooseTemplateByUserLang

So - never mind my original post unless you have any information
that's better than the two ones above.


Well after trying and trying - none of this has worked because
SetTemplate() is no longer a valid method for Conditions in RT 4.0.17
among other reasons.

If anyone has any information on how to dynamically set the Template in
a Scrip with RT 4.0.x I would greatly appreciate it!

--
Landon Stewart :: lstew...@iweb.com mailto:lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932




Re: [rt-users] Plack::Handler::Starlet dependency error, RT 4.0.1 on RHEL-6

2011-07-15 Thread Gene LeDuc

Hi Kevin,

On 7/14/2011 7:08 PM, Kevin Falcone wrote:

On Thu, Jul 14, 2011 at 03:42:31PM -0700, Gene LeDuc wrote:


The Test::TCP thing is a bit of a mystery to me.  I saw it when I
installed all the dependencies a couple days ago so I tried to
install it.  Here's the result:

cpan[1]  install Test::TCP
CPAN: Storable loaded ok (v2.30)
Going to read '/root/.cpan/Metadata'
   Database was generated on Thu, 14 Jul 2011 19:40:27 GMT
CPAN: Module::CoreList loaded ok (v2.18)
Test::TCP is up to date (1.13).

So it's there, but testdeps isn't seeing it.


This is usually permissions or 2 different perls


I used cpanm to reinstall Test::TCP and now testdeps sees it.  I'm 
almost certain that there's only 1 perl on this system; it's a 
nearly-new RHEL-6 install (I'm the one who built it).  Other than apache 
and RT, nothing else has been installed.  How would I determine if there 
are multiple perls installed?



I've also tried installing Server::Starter by itself and I get the
same error messages about uninitialized values and an unopened file
handle.

Writing Makefile for Server::Starter
Use of uninitialized value in ref-to-glob cast at
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
Use of uninitialized value in ref-to-glob cast at
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
flock() on unopened filehandle at
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
Bad file descriptor at
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
END failed--call queue aborted.


It's worth seeing if selinux is blocking flock for this perl program.


I put selinux into permissive (it was set to enforcing), then removed 
and reinstalled Server::Starter (using cpanm) with the same results.  Is 
this error being thrown by a Server::Starter issue or is it from 
whatever process is trying to write the compiled module to disk?



You may get more information by running perl Makefile.PL on
Server-Starter manually and seeing if it gives you anything


I ran the following manually:
[root@bogus Server-Starter-0.11]# perl Makefile.PL
[root@bogus Server-Starter-0.11]# make
[root@bogus Server-Starter-0.11]# make install
[root@bogus Server-Starter-0.11]# make test
  (stuff removed for brevity)
  All tests successful.
  Files=4, Tests=42, 28 wallclock secs ( 0.02 usr  0.00 sys +  0.39 
cusr  0.08 csys =  0.49 CPU)

  Result: PASS


So it looks like Server::Starter installed Ok.

So then I run cpan-t Server::Starter and get the same errors as before., 
including

- Test::TCP   ...missing. (would need 0.11)

Running testdeps doesn't flag Test::TCP

Running cpan -t Test::TCP results in:
Result: PASS
  TOKUHIROM/Test-TCP-1.13.tar.gz
  /usr/bin/make test -- OK


So I'm baffled.
1. make testdeps says that all dependencies are found
2. cpan -t Server::Starter says that Test::TCP is missing and throws 
flock() and bad file descriptor errors at line 104 of 
share/perl5/Test/SharedFork/Store.pm

3. cpan -t Test::TCP says it's installed and good
4. cpanm --reinstall Server::Starter says it's installed and good
5. cpanm --reinstall Plack::Handler::Starlet says it's installed and good

Should I believe testdeps and continue with RT installation?  Os is this 
something that might bite me in the caboose?


Thanks,
Gene


2011 Training: http://bestpractical.com/services/training.html


[rt-users] Plack::Handler::Starlet dependency error, RT 4.0.1 on RHEL-6

2011-07-14 Thread Gene LeDuc

Greetings,

I'm installing RT 4.0.1 onto a new RHEL-6 server.  I've done the 
./configure step and am now resolving dependencies.  I was able to fix 
them all with CPAN except for Plack::Handler::Starlet.  The error is 
coming from a Starlet dependency, Server::Starter.  Searching hasn't 
turned up anything relevant.


I'd really appreciate any insights into this that anyone might have. 
This is 64-bit REHL and I have SELinux enforcing, but I don't think it's 
the problem because nothing else has burped except for this.


Thanks in advance,
Gene

Here's what I get from testdeps:
PSGI dependencies:
CGI::Emulate::PSGI ...found
CGI = 3.38 ...found
CGI::PSGI = 0.12 ...found
HTML::Mason::PSGIHandler = 0.52 ...found
Plack = 0.9971 ...found
Plack::Handler::Starlet ...MISSING
Can't locate Plack/Handler/Starlet.pm in @INC (@INC 
contains: /usr/local/lib64/perl5 /usr/local/share/perl5 
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl 
/usr/lib64/perl5 /usr/share/perl5 /root/rt/rt-4.0.1)


Here's an excerpt of what CPAN says when I do install 
Plack::Handler::Starlet


Checking if your kit is complete...
Looks good
Warning: prerequisite Server::Starter 0.06 not found.
Writing Makefile for Starlet
Could not read metadata file. Falling back to other methods to determine 
prerequisites

 Unsatisfied dependencies detected during 
KAZUHO/Starlet-0.13.tar.gz
Server::Starter [requires]
Shall I follow them and prepend them to the queue of modules we are 
processing right now? [yes]


  CPAN.pm: Going to build K/KA/KAZUHO/Server-Starter-0.11.tar.gz

*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
*** Since we're running under CPAN, I'll just let it take care of the 
dependency's installation later.

[Core Features]
- Test::TCP   ...missing. (would need 0.11)
- Getopt::Long...loaded. (2.38)
- List::MoreUtils ...loaded. (0.32)
- Proc::Wait3 ...loaded. (0.04)
- Scope::Guard...loaded. (0.20)
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Writing Makefile for Server::Starter
Use of uninitialized value in ref-to-glob cast at 
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
Use of uninitialized value in ref-to-glob cast at 
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
flock() on unopened filehandle at 
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
Bad file descriptor at /usr/local/share/perl5/Test/SharedFork/Store.pm 
line 104.

END failed--call queue aborted.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
  KAZUHO/Server-Starter-0.11.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Running make for K/KA/KAZUHO/Starlet-0.13.tar.gz
  Has already been unwrapped into directory 
/root/.cpan/build/Starlet-0.13-eGHCED


  CPAN.pm: Going to build K/KA/KAZUHO/Starlet-0.13.tar.gz

Warning: Prerequisite 'Server::Starter = 0.06' for 
'KAZUHO/Starlet-0.13.tar.gz' failed when processing 
'KAZUHO/Server-Starter-0.11.tar.gz' with 'writemakefile = NO 
'/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 2304'. 
Continuing, but chances to succeed are limited.



2011 Training: http://bestpractical.com/services/training.html


Re: [rt-users] Plack::Handler::Starlet dependency error, RT 4.0.1 on RHEL-6

2011-07-14 Thread Gene LeDuc

Thanks for responding, Kevin.

On 7/14/2011 3:32 PM, Kevin Falcone wrote:

On Thu, Jul 14, 2011 at 03:04:03PM -0700, Gene LeDuc wrote:

Greetings,

I'm installing RT 4.0.1 onto a new RHEL-6 server.  I've done the
./configure step and am now resolving dependencies.  I was able to
fix them all with CPAN except for Plack::Handler::Starlet.  The
error is coming from a Starlet dependency, Server::Starter.
Searching hasn't turned up anything relevant.

I'd really appreciate any insights into this that anyone might have.
This is 64-bit REHL and I have SELinux enforcing, but I don't think
it's the problem because nothing else has burped except for this.


Is your CPAN client configured to follow dependencies?
It appears that you're missing Test::TCP but I see no attempts to
build that.

have you tried

install Server::Starter
or
install Test::TCP

to get lower level on the dependency chain?

-kevin


The Test::TCP thing is a bit of a mystery to me.  I saw it when I 
installed all the dependencies a couple days ago so I tried to install 
it.  Here's the result:


cpan[1] install Test::TCP
CPAN: Storable loaded ok (v2.30)
Going to read '/root/.cpan/Metadata'
  Database was generated on Thu, 14 Jul 2011 19:40:27 GMT
CPAN: Module::CoreList loaded ok (v2.18)
Test::TCP is up to date (1.13).

So it's there, but testdeps isn't seeing it.

I've also tried installing Server::Starter by itself and I get the same 
error messages about uninitialized values and an unopened file handle.


Writing Makefile for Server::Starter
Use of uninitialized value in ref-to-glob cast at 
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
Use of uninitialized value in ref-to-glob cast at 
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
flock() on unopened filehandle at 
/usr/local/share/perl5/Test/SharedFork/Store.pm line 104.
Bad file descriptor at /usr/local/share/perl5/Test/SharedFork/Store.pm 
line 104.

END failed--call queue aborted.

Any other thoughts?

Gene


2011 Training: http://bestpractical.com/services/training.html


Re: [rt-users] web UI shifted to the right?

2011-05-24 Thread Gene LeDuc

Recent browser or OS upgrade?  That could affect the processing of css.

Gene

On 5/24/2011 8:32 AM, Jeff Blaine wrote:

RT 3.8.7

Has anyone noticed a strange shift to the right of
the web UI at any point in time?

We noticed this last week for the first time after
using that instance for months. All of a sudden
even the front-page login box is off-centered.
Searching the filesystem for modified files shows
nothing other than the database and Mason cache.

Clearing the Mason cache + restarting does not
address the issue.



Re: [rt-users] Custom Field values - included in Autpo-reply Template

2010-12-01 Thread Gene LeDuc

Hi Jo,

On 11/30/2010 9:31 PM, Joanne Keown wrote:

Hi,

I have been trying out numerous suggestions on how to code to include values from Custom Fields 
into an Auto-reply email.  The Custom Field is First Name and I want the first name 
entered on the ticket, to appear after the word Hello on the Auto-reply email.   The 
below is my latest attempt (based on user feedback on other threads) however, this doesn't work 
either as the email just doesn't send (NB; if I take the line of code out altogether then the email 
does send).

Hello {my $First Name = $Ticket-FirstCustomFieldValue('First Name')}

I'm not a programmer, so apologies if this problem sounds a bit 101, however I 
could really use some pointers.

Kind regards

Jo


If the line you included above is actually from your template, then the 
problem is the my $First Name = part.  Perl will see $First as a 
variable name and won't know what to do with Name.  Try replacing my 
$First Name = with my $First_Name =.  The underscore makes Name 
part of $First.  I'm not sure whether spaces are allowed in custom 
field names.


Regards,
Gene


Re: [rt-users] Templates and custom ScripActions

2010-10-22 Thread Gene LeDuc

Hi Fran,

On 10/22/2010 8:15 AM, Francis L Fabrizio wrote:

Do I have to do something specific when creating a Scrip and using Action: User 
Defined in order to get RT to process the associated template with the scrip?

I have created a custom scrip, and just for testing purposes, I made the custom 
condition, custom action prep, and custom action cleanup all set to return 
1;, and associated my desired template with the scrip.  The scrip fires and returns 
successfully, but the template is never touched.

Are there specific steps I need to take in my custom action code in order to 
load, parse, and send notifications from a template?

Thanks,
Fran


I'm using v3.6.3, so this may not be accurate with your setup.

I know of ways to do what you want.

The way I prefer to do it is to embed the code into the template.  I've 
found this to be fairly easy to do and it involves less code.  It can 
also be trickier to debug because the scrip doesn't tell you what action 
is being taken - it's all in the template.  It does make the template 
bigger.  Almost all of my templates have embedded decision-making and 
data-processing routines in them.  Here's a piece of one of my templates 
that builds a custom acknowledgment e-mail.


= BEGIN TEMPLATE CODE
{ ### Tells user that ticket has been resolved
  my $FromAddress = 'DNS Requests someaddr...@domain';
  my $ContactAddress = 'm...@domain';
  my $OwnerName = $Ticket-OwnerObj-RealName;
  my $have_rmks;
  my $c_content;

  ### Get last Correspond
  my $Transactions = $Ticket-Transactions;
  $Transactions-Limit( FIELD = 'Type', VALUE = 'Correspond' );
  $Transactions-OrderByCols (
 { FIELD = 'Created',  ORDER = 'DESC' },
 { FIELD = 'id', ORDER = 'DESC' },
  );
  my $CorrespondObj = $Transactions-First;
  if ($CorrespondObj  $CorrespondObj-Id) {
$c_content = $CorrespondObj-Content;
chomp $c_content;
$have_rmks = 
!$CorrespondObj-Attachments-First-GetHeader('Received');

  }
### Lots of other code removed
  my $AddressGroup = From: $FromAddress;
  $AddressGroup .= \nCc: $Cc if $Cc;
  $AddressGroup .= \nBcc: $Bcc if $Bcc;
  $OUT = $AddressGroup
Subject: Action completed

The ticket that was opened for your request for host \$mName\ has been 
resolved by $OwnerName.  If you have any questions about this, you can 
contact us at $ContactAddress.

$remarks

Regards,
Your Friendly IT Staff;
}
= END TEMPLATE CODE

Another way to do this that actually uses a user-defined action with a 
template is to make the calls to the appropriate RT routines from within 
your scrip code.  I did this with one of my scrips.


I wanted to do some non-standard things with the recipients, so I 
modified RT's SetRecipients() routine and stuck it into my scrip, then I 
call it and make calls to the Prepare() and Commit() routines to build 
and send an e-mail using the designated template.


= BEGIN SCRIP CODE
### Valid e-mail for ticket, send acknowledgment
$self-SetRecipients();
$self-SUPER::Prepare();
$self-SUPER::Commit();

sub SetRecipients {
  ### custom routine to do non-standard things with the recipients
}
1;
= END SCRIP CODE

The above code snippet is at the end of my scrip's Custom action 
preparation code block.


Regards,
Gene


Re: [rt-users] Possible?

2010-07-19 Thread Gene LeDuc

On 7/19/2010 4:21 AM, Jim Tambling wrote:

Hi list,
How would I dosomething like this in RT? I want it to apply to all
queues/tickets.
When due date = today, make priority = 0
Many thanks, Jim


Hi Jim,

As far as I know, RT is event driven so it wouldn't be able to do this 
on its own.  It should be a fairly simple matter to do this with a cron 
job and custom perl script, however.


Regards,
Gene

Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] regex for mac address

2010-06-02 Thread Gene LeDuc

Hi Troy,

The format for MAC addresses is not standardized.  I've seen them with 
(Win, RedHat) and without (Solaris) leading zeros, colons (RH, Solaris) 
or hyphens (Win) as separators, and uppercase (Win, RedHat) or lowercase 
(Solaris) hex values.  I think I've also seen network gear that shows 
them as ::.  It really depends on where the MAC info is 
coming from.


These may not be perfect, but you get the idea.

WXP: /^([0-9a-f]{2}-){5}[0-9a-f]{2}$/i
RH: /^([0-9a-f]{2}:){5}[0-9a-f]{2}$/i
Sol: /^(([0-9a-f]|[1-9a-f][0-9a-f]):){5}([0-9a-f]|[1-9a-f][0-9a-f])$/i

You could try normalizing the string by replacing all colons with 
hyphens and then adding a leading zero to all single character values, 
and then applying your regex.


Regards,
Gene

On 6/2/2010 2:06 PM, Troy Knabe wrote:

I am trying to do a regex for mac address verification. My first attempt
looks like this, but did not work. Anyone have any insight as to what I
am missing?

^[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}$

--
Troy Knabe
kn...@4j.lane.edu mailto:kn...@4j.lane.edu




Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Scrip to unown and change queue so we can keep all queues hidden?

2010-05-13 Thread Gene LeDuc

Hi Mike,

I haven't done this, but it sounds pretty straightforward using a scrip. 
 Have a custom field with 2 possible values, blank and disown. 
Your scrip uses a custom condition that triggers when that field changes 
to disown.  You have the custom action do the owner change (to 
nobody), the queue change, and then change the custom field back to 
blank.  The wiki should be able to give you good examples of all three 
actions as well as the custom condition.


Regards,
Gene

On 5/13/2010 7:34 AM, Mike Johnson wrote:

Hi everyone,

I'm curious if anyone has ventured out to build a scrip that would unown a 
ticket, and reassign to another queue based on a custom field value.

Basically what I was looking for was the ability to hide all other queues from 
a group of support staff.  But when they get a ticket that doesn't belong to 
them, they can remove themselves as owners, and put the ticket in the 
appropriate queue.  Now if you have the queues hidden, the only thing I could 
think of is let the RT-system remove them as owner, and change the queue based 
off of a custom field value they'd change.

Is it possible?

Has anyone done it?

Thanks!


Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON   P7B 5E1
Phone: (807) 766-7331
Email: mike.john...@normed.ca
Technology assistance: email nosmhelpd...@normed.ca
Technology Emergency Contact (TEC) Mon-Fri, 8am to 5pm excluding stat holidays:
Off campus toll free 1 (800) 461-8777, option 8, or locally either
(705) 662-7120 or (807) 766-7500



Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com



Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Scrip for replying to a resolved ticket, scrip results

2010-04-21 Thread Gene LeDuc

Hi Evan,

On 4/21/2010 8:02 AM, Lucchesi Leon, Evan wrote:

Hi all, two questions that I haven't been able to find answers to after
a few hours of searching and reading through code:

(For reference I use RT 3.8.4 right now)

1) I'd like to set up a scrip that will correspond with a template when
someone replies to a ticket that has been resolved. I have tried a
number of different things to try and only send the reply to the person
who sent the correspondence, but I gave up and decided I'd be happy if
it would just autoreply to all requestors and CCs with my template when
someone replies to it and it's resolved. So the most recent scrip I have
tried is the simplest, and doesn't seem to do anything. Can anyone tell
me what I'm doing wrong?

Condition: User Defined
Action: Autoreply to Requestors and Ccs
Template: Global template: Autoreply to Resolved
Stage: TransactionCreate

Custom Condition:
return 0 unless ($self-TransactionObj-Type eq Correspond 
$self-TicketObj-Status eq Resolved);
return 1;


I don't know whether it matters, but I always use lowercase for 
TicketObj-Status because that's how it's stored in the database (in 
3.6.3).  I have a similar scrip (but with additional conditions) and it 
works using Correspond and resolved.


If changing the case doesn't work, putting $RT::Logger-debug(Myscrip 
Status= . $self-TicketObj-Status . , Type= . 
$self-TransactionObj-Type) as your first line might help you figure 
out what is going on.


Gene

Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Scrip - Autoclose on Admin reply

2010-03-24 Thread Gene LeDuc

Hi Jason,

We use something similar that you can probably mod as needed.  If a 
queue admin replies to a ticket with an OK, the owner is set to the 
sender and the ticket is resolved.  We use the Priority field of tickets 
as a workflow tag; in this case, assigning it a value of 20 triggers 
another scrip that sends out the resolved e-mail.  I don't record the 
Owner or Status transactions because I don't want either to trigger any 
other scrips (the Priority transaction will trigger the Resolved scrip).


Here's what I use:
// Custom condition
{ ### True if e-mail contains 'ok' - sets owner, pri = 20
  my $Ticket = $self-TicketObj;
  my $Transaction = $self-TransactionObj;
  my $CreatorId = $Transaction-CreatorObj-Id;
  my $Queue = $self-TicketObj-QueueObj;
  my $val = $Transaction-Type eq 'Correspond'
  $Queue-IsAdminCc($CreatorId)
  $Transaction-Content  =~ /\bok\s/i;
  return $val;


// Custom preparation code
return 1;


// Custom cleanup code
### Set priority to 20 to show complete, status to 'resolved'
my $Ticket = $self-TicketObj;
my $Transaction = $self-TransactionObj;
my $CreatorId = $Transaction-CreatorObj-Id;
my $NewPri = 20;
$Ticket-_Set(Field='Owner', Value=$CreatorId, RecordTransaction=0);
$Ticket-SetPriority($NewPri);
$Ticket-_Set(Field = 'Status', Value = 'resolved', RecordTransaction 
= 0);


Gene

On 3/23/2010 8:11 PM, Jason Clarke wrote:

Hi list,

I'm looking for some guidance on setting up a scrip to provide a odd bit
of functionality.

1) New email comes in.
2) Auto assigned to queue.
3) Auto-response goes to requester
4) Auto-notification goes to watchers
5) Watcher responds via email (thunderbird/outlook etc)
6) RT pushes response to requester
7) Custom Scrip sees that 5) came from a static list (or list of users
in RT) and resolves the ticket.

Links to documentation or even a code sample would be greatly
appreciated. I've gone through wiki.bestpractical.com without much
success, but if there is THE page there, please link me :)



Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Question on using QUEUE related Custom Field for Resolved Condition Checking scrip/template

2010-03-09 Thread Gene LeDuc
On 3/9/2010 10:13 AM, Joe Kirby wrote:
 I would like to achieve the following event upon a ticket being Resolved.

 RT is delivered with a global scrip for Resolved using a delivered
 Template for Resolved.

 Assumption is that a scrip can only have a single template assigned and
 therefore I would need several Resolved scrips/templates with specific
 conditions. I am assuming if the condition is not met then it would do
 nothing and try the next scrip.

 I tried to establish a Global CF for all Queues. This CF would have a
 Resolved Template value available to be set at the Queue Level.

 When a ticket is resolved I would have a global scrip with a user
 defined condition to determine if the ticket status was resolved AND if
 the value of the Queue CF for which Template to use was equal to the
 scrip/template I am in then perform the notification to requestor else
 move onto the next Resolve scrip.

 I know it sounds crazy but we want to offer custom messages/surveys
 depending on which Queue it is resolved.

 I have had success using CF's involving ticket transactions but have hit
 the wall trying to get this to work. I am trying to avoid having a
 separate resolve scrip/template established for each queue. We have 92
 Queues which will have a group of 5-6 possible resolved scrip/template
 options since that is the number of different groups using it at our campus.


If you only have 6 possible e-mail responses, it is reasonable to do the 
queue checking with code in the template itself using if(){}elsif(){} 
blocks.  I do this quite a bit.  I wouldn't recommend it for a a lot of 
different e-mail responses though.

Gene
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Scrip check body of email for text

2009-11-16 Thread Gene LeDuc
Hi Kevin,

Check out the /m modifier.  This should match what you are specifying 
(which is different from your example, by the way):
   $Transaction-Content =~ /^RMA.*has been received$/m

The /m tells perl to treat the string as multiple lines and the ^$ 
anchors match the beginning and end of any line in the string.

Your specification (and my suggestion) does not match your example 
because the example line ends with   rather than d.  If you want 
trailing spaces to be Ok in the line, use received\s*$ instead of 
received$.  A line that ends with received. will not match, though.

If all you want is RMA at the beginning and followed by has been 
received somewhere on the same line, then you could use received.*$ 
instead.  That would allow anything to follow received and still 
match.  Have fun!

Regards,
Gene

Kevin Squire wrote:
 I am modifying the scrip found at 
 http://www.gossamer-threads.com/lists/rt/users/70038#70038
 posted by gle...@-  and could use some help
 
 
 The original, true if e-mail contains 'ok'
 $Transaction-Content =~ /\bok\s/i; 
 
 I need to make it true IF a line (any line - 1st, 2nd, etc) starts with
 RMA and ends with has been received
 
 An example line is:
 RMA-47767-1 has been received 
 
 (This email is coming in from a third party, that I do NOT have much
 control over their setup... so there may or may not be a space at the
 end of the line, and I can't not control if it is the 1st line or not -
 it always appears as the first line of TEXT .. but I am pretty sure
 their system is adding a extra blank line or two at the beginning of
 the body)
 
 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Conditionally prevent logging a ticket creation

2009-09-30 Thread Gene LeDuc
Hi All,

In my OnCreate scrip, I check to see whether I really want this ticket 
to be created based on various criteria in the message headers.  RT 
creates the ticket before the scrip runs, so if I decide that I don't 
want it, I trigger another scrip that deletes the ticket.  Not real 
elegant, but it does the job.  My delete scrip logs that the ticket got 
deleted, but the RT generates its own log entry that the ticket was 
created.  So my rt.log ends up looking like this:
   Ticket #1219 from x...@abc.com deleted. ((eval 475):5)
   Ticket 1219 created in queue 'beer' by x...@abc.com 
(/path/to/rt/lib/RT/Ticket_Overlay.pm:754)

The first log entry is mine documenting the ticket deletion.  The next 
one is RT's documenting the ticket creation.

This can be confusing, so I'd like to stop RT from making that final log 
entry if I can.

I'm guessing that RT is using a stack to keep track of log entries, so 
the first transaction (the ticket creation) ends up at the bottom of the 
stack and gets written to the log after my manual log entry from the 
OnCreate scrip.  Can I pop it off the stack so that it just goes away or 
make my ticket deletion log entry be written after RT's ticket creation 
entry (pop, $RT::Logger-info(), push)?

Thanks,
Gene
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to call code in RT_SiteConfig.pm?

2009-09-22 Thread Gene LeDuc
Solving my own problem, but not really answering my own question...

Since I'm trying to call the subroutine from a user-defined action in a 
scrip, I added package RT::Action::UserDefined; before the subroutine 
header so that it's in the same context as the scrip.

My question still stands, however.  What package name would code in the 
RT_SiteConfig.pm file be referenced as?

Regards,
Gene

Gene LeDuc wrote:
 Hi All,
 
 I've put a small subroutine called EmailInMyDomain() into my 
 RT_SiteConfig.pm file.  How do I call it from a scrip?  I get an error 
 when I try calling it like:
 if ( EmailInMyDomain($email) ) { }
 (Undefined subroutine RT::Action::UserDefined::EmailInMyDomain ...)
 
 Appreciate any help you can give me on this.
 
 Regards,
 Gene

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] How to call code in RT_SiteConfig.pm?

2009-09-21 Thread Gene LeDuc
Hi All,

I've put a small subroutine called EmailInMyDomain() into my 
RT_SiteConfig.pm file.  How do I call it from a scrip?  I get an error 
when I try calling it like:
if ( EmailInMyDomain($email) ) { }
(Undefined subroutine RT::Action::UserDefined::EmailInMyDomain ...)

Appreciate any help you can give me on this.

Regards,
Gene
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Prevent ticket creation when RT is not To: addressee

2009-09-14 Thread Gene LeDuc
Hi All,

I'd like to prevent ticket creation when an incoming e-mail does not 
have one of RT's addresses as a To: address.  In other words, if a 
ticket gets to RT only because of a Cc: or Bcc:, I don't want a ticket 
to be created.  The problem this solves for me is I get a lot of 
spurious tickets created by Reply-All e-mails.  What I've done in the 
past is use an OnCreate scrip to determine whether the ticket should 
have been created, and then delete it if it's bogus.  This approach gets 
rid of the ticket, but it still clutters the database and increments the 
ticket ID with each bad ticket.

I've looked at the wiki and searched a couple years of rt-users 
messages, but haven't found an answer.  So I'm ready to roll my own. 
Before I do, though, I have some questions:

1.  Has this already been done and is the code out there somewhere?
2.  Does RT know what addresses are assigned to it?  (Since incoming 
mail is handled by the MTA and only the queue name is passed to 
rt-mailgate, my guess is No, but it's worth asking anyway.  I do know I 
can get the queue addresses RT uses for outgoing mail.)
3.  Am I overlooking some reason I should not do this?  (I've been a 
victim of the Law of Unintended Consequences before and would prefer to 
avoid it if possible.)

Thanks for your insights.
Gene
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Conditions in a template?

2009-09-03 Thread Gene LeDuc
Assuming that your auto-reply template is getting control via an 
on-create scrip, the owner has already been set to B before your code 
runs in the template (I think RT assigns everything before the on-create 
transaction is recorded).  In your template code you can check the 
current value of Owner and, if it is Nobody or null, set it to A (and 
don't do anything if it is something else).  Something like
if ( $Ticket-Owner  $Ticket-Owner-Id == 10 ) { ### set owner to A }

To be more portable, you might want to compare to the actual Id() of the 
Nobody user rather than hard-code in 10.  On my 3.6.3 system, 
Nobody is 10.

Regards,
Gene

testwreq wreq wrote:
  
 
 Dear RT Gurus,
 
 We have created cusomized Auto Reply templates for all the queues, 
 that overwrites the Global Auto Reply template. I am wondering if 
 anyone know of any documentation on customizing template with conditions?
 
  
 
 Basically, the first few lines of my customized template is assigning a 
 owner 'A' to the queue, and it does not record the transaction.
 
  
 
 This is fine when the request is generated via email. However, we are 
 coming accross a situation where users are generating request using the 
 'Ticket Create Option' of the interface and want to assign the ticket to 
 another staff member.. i.e. oweber 'B'. The users are able to select 
 owner B from the interface, but because of our customized template, 
 the owner is written back as A.
 
  
 
 Is there a condition that I can use to check the previous value of owner
 
 prior to assigning owner B?
 
  
 
 For Eaxmple, check if Field='owner' has a value,
 
   if yes, keep the same value and set RecordTransaction=0,  ELSE
 
 give the value as 'B'  and set RecordTransaction=0
 
  
 
  
 
 Any suggestions/hlp will be appreciated. Regards rq.
 
 = END ===
 
  
 
 {
 
 ### assigns owner but doesn't record transaction ### Note that $owner 
 needs to be the RT id for the owner object, ### not a name or e-mail 
 address.
 
 my $owner = '22';
 
 $Ticket-_Set(Field='Owner', Value=$owner, RecordTransaction=0); $OUT 
 .= ; }
 
 Subject: AutoReply: {$Ticket-Subject}
 
  
 
 This message has been automatically generated in response to the 
 creation of a trouble ticket regarding:
 
 {
 
   if ($Ticket-Subject() eq '') {
 
   $OUT .=  No Subject;
 
 }
 
 }
 
   { $Ticket-Subject() }
 
  
 
 A summary of which ...
 
 ===
 
 {$Transaction-Content()}
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] History of Custom Field Values kept anywhere?

2009-08-31 Thread Gene LeDuc
Scott, look in the ObjectCustomFieldValues table.  There are pointers 
into it from the OldReference and NewReference fields in the 
Transactions table.  I'm using 3.6.3, but I'm guessing that the same 
will be true in 3.8.4.

Gene

Lander, Scott wrote:
  
 We accidentally changed some values in a Custom Field, and they need to 
 be set back.I can retrieve the values from our backup, but, the 
 question came up of if RT keeps the history for them.Poking thru the 
 database, I see it keeps the history for tickets (table Transactions), 
 and that it keeps most of the data for Custom Fields in the table 
 CustomFieldValues.   It keeps Creator, Creation Date, Last Updated By 
 and Last Update Date.   But, so far, I haven't found anywhere it keeps 
 what was changed.  IE, category old value, new value, like you find 
 in the Transactions table.
  
 This would seem to be very useful information to have - especially in 
 the case of a system audit.
  
 Am I just missing something?
  
 This in on RT 3.8.4, btw.

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Send email from script

2009-07-21 Thread Gene LeDuc
Hi Tariq,

The obvious answer: You select one of the Notify actions that generate 
e-mail and use a template to design the e-mail.

But you probably would've figured that out for yourself.

If you are asking how to send an e-mail from a scrip with a user-defined 
action, I don't think you can.  I get around this shortcoming by 
generating some other transaction in the script code and then use that 
transaction to trigger a scrip that does the Notify action.  Convoluted, 
but it works.

We don't use the Priority field in our tickets, so I use it to trigger 
stuff like that.

Have fun!
Gene

Tariq Doukkali wrote:
 Hello,
 
 how can I send an email from a script ???
 
 Many thanks

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] auto assign owner to queues

2009-07-10 Thread Gene LeDuc
testwreq wreq wrote:
 Hello, I am new to the RT system. Can some one please tell me how should 
 I default an owner to a queue?
  
 All the tickets were coming to the general queue when users submitted 
 tickets using email to r...@domain.com mailto:r...@domain.com. I created 
 an email alias rt-...@domain.com mailto:rt-...@domain.com with -queue 
 as web. Now all the emailed tickets get generated in the web queue. I 
 would like to know how I can default an owner to this queue?
  
 I wrote a simple scrip that assigns an owner to the web queue. But the 
 problem is that RT generates a correspondence when the ticket is created 
 with NOBODY as owner, and then it generates a second correspondence that 
 it has assigned the ticket. I want to avoid the second communication. 
 For this reason, I am wondering if there is a way that I can default an 
 owner to a queue?

This should work for you:
1. In your web queue, create a copy of the global notify template that 
the on-create scrip is using.  Give it the same name as the global template.
2. Edit the new template and put a line of perl at the beginning that 
assigns the appropriate owner to the ticket without creating an 
ownership change transaction.  Look on the wiki for an example that uses 
Set(Field='Owner',Value=$owner,RecordTransaction=0).

Why this should work:
Step 1 tells RT to use the web queue template instead of the global 
template (because they have the same name).
Step 2 sets the ownerdhip of the ticket without creating a new 
transaction and sends out your notification.  Using the 
RecordTransaction=0 option of the Set() call instead of the SetOwner() 
call prevents the ownership-change scrip from firing and sending a 
second notification.

Have fun with RT!

Regards,
Gene

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Scrips actions - limiting correspondance propogation to internal users

2009-06-23 Thread Gene LeDuc

Hi Richard,

The RT::User class has a method named Privileged that might do what you are 
looking for.  Something like this perhaps:

  my $Creator = $self-TransactionObj-CreatorObj;
  my $Privileged = $Creator-Privileged();

I use this to prevent privileged users from doing a password reset via e-mail.

Gene

At 07:22 AM 6/23/2009, Richard Brady wrote:

Hi folks

Anyone have any ideas about the unanswered question below?

I think the key is to write a custom condition to identify whether the 
actor is a privileged or unprivileged user, but I'm not sure how I would 
do that?


Richard

2007/6/15 Mark Royan mailto:m...@coastal-it.comm...@coastal-it.com
The scrip that appears to control this is, but we are unsure how to
limit it to only act when initiated by one of our user's within the
system -
On Correspond Notify Requestors and Ccs with template Correspondence

Is there a way to limit the auto-sending of correspondence when an
external user replies to a ticket? We want the external users to be able
to reply to the ticket so that the content is automatically included in
the ticket but we don't want that reply to be automatically forwarded
per the On Correspond Notify Requestors and Ccs with template
Correspondence scrip. It seems that we do need to keep this script in
the system in some capacity to maintain proper handling when internal
users reply to a ticket. Has anybody discovered a way to do this?


Regards,
Mark Royan
Coastal IT Consulting, LLC
http://www.coastal-it.comhttp://www.coastal-it.com


--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Implementer comments in a template

2009-06-18 Thread Gene LeDuc
Jeremy, templates use perl code, so just use perl comments:

{ ### This template is for doing something or other.
###  Call me if you have any question. }

Regards,
Gene

At 07:28 AM 6/18/2009, Jeremy Winder wrote:
How do I add comments to my templates so they can be backed up or moved
from RT install to RT install with the implementation notes right in the
template?

Thanks,

Jeremy

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Notify new users about their login information

2009-05-20 Thread Gene LeDuc
Hi Tommy,

The database is whatever database that was decided on when RT was 
installed; it has nothing to do with perl.  We use MySQL for our database 
and I use Toad to do my snooping.  I really can't tell you anything about 
your installation's database or how to access it.

Here there be dragons, lad...  Pretty much everyone agrees that accessing 
the database directly, instead of letting RT do the grunt work, is not 
generally a great idea.  I did it because I wanted to understand what is 
going on behind the scenes with RT.  These observations have often been 
helpful, but at other times have led me down the wrong path.  You should 
never modify the database directly.

Gene

At 11:09 AM 5/20/2009, Thomas Fluch wrote:
thank you for your example code!

You said, that you poked aroung in the database. I guess, that this 
database would help me a lot finding objects and their preferences I can 
use in a custom condition or custom action. Would you tell where i can 
find this database exactly so that i can try to understand perl a little?

Thank you!
Best regards, Tommy!

  Gene  LeDuc gle...@mail.sdsu.edu 2009-05-18 18:39 
Ah, didn't realize you meant creating a user via the web.  Poking around in
the database, I'd guess that something like the following might work as
your custom condition:

{ ### True when new user created via web
my $TA = $self-TransactionObj;
my $val = $TA-ObjectType eq 'RT::User'
$TA-Type eq 'Create'
$TA-CreatorObj-Id  != 1;
return $val;
}

I haven't tried the above (or used ObjectType), but I think it's at least a
good place to start.  The following observations are for v3.6.3.  When a
user is created via an e-mail ticket, the Creator is the System user, and
the System user is #1.  When a user is created via a web session, the
Creator is the logged in user, which is always  #12.  Set this up in a
global scrip and use a variant of the auto-password template you're already
using for tickets.  If it doesn't work, throw some debug logging stuff in
and see what you get.  Once you get it working, this would be a good wiki
addition!


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Notify new users about their login information

2009-05-18 Thread Gene LeDuc
One way to auto-assign a new user an account password is to do it via the 
autoreply template, no new scrips needed.  There's a good example you can 
start with on the wiki.

At 01:36 AM 5/18/2009, tommy0660 wrote:

Another thing I would want to implement is, that when a new user has been
created, immediately after the creation the user should be informed via
email to his email-address about his login information like:


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Notify new users about their login information

2009-05-18 Thread Gene LeDuc
Ah, didn't realize you meant creating a user via the web.  Poking around in 
the database, I'd guess that something like the following might work as 
your custom condition:

{ ### True when new user created via web
   my $TA = $self-TransactionObj;
   my $val = $TA-ObjectType eq 'RT::User'
   $TA-Type eq 'Create'
   $TA-CreatorObj-Id  != 1;
   return $val;
}

I haven't tried the above (or used ObjectType), but I think it's at least a 
good place to start.  The following observations are for v3.6.3.  When a 
user is created via an e-mail ticket, the Creator is the System user, and 
the System user is #1.  When a user is created via a web session, the 
Creator is the logged in user, which is always  #12.  Set this up in a 
global scrip and use a variant of the auto-password template you're already 
using for tickets.  If it doesn't work, throw some debug logging stuff in 
and see what you get.  Once you get it working, this would be a good wiki 
addition!

Gene

At 08:29 AM 5/18/2009, Thomas Fluch wrote:
Thanks for your answer.

I already set up the automatical creation of a username and password for 
new users, but thats not what i meant.

I mean, that if I AM CREATING a new user as an admin or root via the Users 
- New User interface i dont want to manually inform this user (or more 
users) about their login information. If I click on create, the user 
should automatically get an email with the login information.

I cant solve that issue by any templates or existing scripts, because the 
condition create, which i used to inform new customers about their login 
information, refers to create a ticket and not creat a user. So 
actually I dont want to inform someone when he creates a ticket. I want to 
inform a supporter when i create his account.

Regards,
Tommy!


  Gene  LeDuc gle...@mail.sdsu.edu 2009-05-18 17:23 
One way to auto-assign a new user an account password is to do it via the
autoreply template, no new scrips needed.  There's a good example you can
start with on the wiki.

At 01:36 AM 5/18/2009, tommy0660 wrote:

 Another thing I would want to implement is, that when a new user has been
 created, immediately after the creation the user should be informed via
 email to his email-address about his login information like:


--
Gene LeDuc, GSEC
Security Analyst
San Diego State University


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Templates - Acceptable Fields?

2009-05-18 Thread Gene LeDuc
$Ticket-Owner is an object ID.  Try these instead:

$Ticket-OwnerObj-RealName
$Ticket-OwnerObj-EmailAddress

At 09:46 AM 5/18/2009, Jeff Lucas wrote:
I attempted to add the following to my AutoReply template...

This ticket is owned by:

 {$Ticket-Owner()}

Unfortunately, Owner() results in just the users ID (i.e. 63) which is
meaningless to most folks.  Instead, I'd like to include the owner's
Name and/or email address.  I do not see either in the ACCEPTABLE
FIELDS at http://wiki.bestpractical.com/view/Template_Fields.


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Including custom field values in templates

2009-05-15 Thread Gene LeDuc
Hi Fran,

To use the value of a custom field AoR in a template:

   my $aor = $Ticket-FirstCustomFieldValue('AoR');

Regards,
Gene

At 10:45 AM 5/15/2009, Fran Fabrizio wrote:
Struggling with this one.  Created a custom field called AoR which is
a Select One Value field.  Applies to Tickets.  Added it to my queue.
Can see and use it on the web interface no problem.

I just want to modify my standard template for On Resolve to include a
phrase like A ticket with AoR: SampleValue was just resolved but I
can't for the life of me figure out how to use the $Ticket variable to
get to the custom fields or their values.


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] default autoreply unless defined per queue - possible?

2009-05-06 Thread Gene LeDuc
Yes, that's how it works.  If there is a queue template with the same name 
as the global template, the scrip will use that instead of the global for 
that queue only.  It will use the global template for all queues that do 
not have their own local template.  It's a clever implementation.


Gene

At 08:44 AM 5/6/2009, Bernhard Hansbauer wrote:

Hi,

still not lucky so far, also due to a complete different approach before,
and just to get that right - will the following solve this task?

1. create a global script for autoreplies:
Description: Autoreply
Condition: On Create
Action: Automatic Answer to client
Template: Autoreply
Phase: TransactionCreate

no other conditions, code or whatever

2. create a global template named Autoreply

3. in queues where necessary, create a template called Autoreply as well

will this be enough to use the queue template instead of the global 
template for an autoreply?


thanks a lot,

bernhard


Gene LeDuc schrieb:
As Ruslan pointed out earlier, creating an Autoreply template in the 
queue overrides the global template.  RT checks first for a queue 
template and uses it if one is found, otherwise it uses the global 
template of the same name.  No need to delete or create scrips in this case.


At 03:31 AM 4/30/2009, Andraz Sraka wrote:

re

On Thu, 2009-04-30 at 09:21 +0200, Bernhard Hansbauer wrote:

 using RT 3.8.2 with RTFM 2.4.0
 as mentioned in the subject, i wonder if it's possible to have a
 default autoreply on ticket creation, _unless_ there is an autoreply
 defined in the queue. any hint greatly appreciated,

Delete Autoreply To Requestors script in global scripts and define a
new custom one:

Condition: User Defined
Action: Autoreply to Requestor
Template: Global template: Autoreply
Stage: TransactionCreate

Custom condition:
  return($self-TransactionObj-Type eq Create 
$self-TicketObj-QueueObj-Name ne X )

 - is your defined queue name

For XXX queue you need to create new script defined in queue for example
to sends out different custom reply.

I hope it helps.

regards,
 Andraz





--
Bernhard Hansbauer
System Administrator
mailto:bernhard.hansba...@greentube.combernhard.hansba...@greentube.com
-
Greentube I.E.S. AG
Mariahilfer Straße 47/1/102
A-1060 Wien
FN 197003k, HG Wien

Tel: +43 1 494 50 56 - 30
http://www.greentube.comhttp://www.greentube.com
-


Internet Email Confidentiality Footer

Privileged/confidential information may be contained in this message. If 
you are not the addressee indicated in this message (or responsible for 
delivery of the message to this person), you may not copy or deliver this 
message to anyone. In such a case, you should destroy this message and 
kindly notify the sender by replying. Please make it known immediately  f 
you or your employer does not consent to the medium of e-mail for messages 
of this kind. Opinions, conclusions and other information in this message 
that do not relate to the official business of my firm shall be understood 
as neither given nor endorsed by it.



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] default autoreply unless defined per queue - possible?

2009-04-30 Thread Gene LeDuc
As Ruslan pointed out earlier, creating an Autoreply template in the queue 
overrides the global template.  RT checks first for a queue template and 
uses it if one is found, otherwise it uses the global template of the same 
name.  No need to delete or create scrips in this case.

At 03:31 AM 4/30/2009, Andraz Sraka wrote:
re

On Thu, 2009-04-30 at 09:21 +0200, Bernhard Hansbauer wrote:

  using RT 3.8.2 with RTFM 2.4.0
  as mentioned in the subject, i wonder if it's possible to have a
  default autoreply on ticket creation, _unless_ there is an autoreply
  defined in the queue. any hint greatly appreciated,

Delete Autoreply To Requestors script in global scripts and define a
new custom one:

Condition: User Defined
Action: Autoreply to Requestor
Template: Global template: Autoreply
Stage: TransactionCreate

Custom condition:
   return($self-TransactionObj-Type eq Create 
 $self-TicketObj-QueueObj-Name ne X )

 - is your defined queue name

For XXX queue you need to create new script defined in queue for example
to sends out different custom reply.

I hope it helps.

regards,
  Andraz


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] replying to resolved notification re-opens ticket

2009-04-29 Thread Gene LeDuc
Hi Gravy,

We just disable global script #1 (On Correspond Open Tickets).  You could 
also replace the condition with a user-defined one that includes a check 
for (status ne 'resolved'  status ne 'rejected').

Regards,
Gene

At 07:53 AM 4/29/2009, GravyFace wrote:
When a ticket is resolved, RT sends out a system notification,
According to our records, your request has been resolved..  Being
polite, our customers usually reply to our resolution emails with a
thank you -- I could tell them not to, I guess, but am wondering
what others in the RT community do.

Not a deal-breaker, but I could see this getting annoying for us.


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] onCorrespond second scrip is ignored + business Date

2009-03-30 Thread Gene LeDuc
Hi Julien,

This input is for Business::Hours rather than SLA (never used SLA).  I use 
Business::Hours both to set an appropriate due date for us (our hours are 
8x5) and to generate reminders when the due date is getting close.  I use 
use Business::Hours; in my scripts.

Gene

At 07:53 AM 3/30/2009, jul wrote:
Hello,

I stumble on a simple problem that I cant fix since I dont know whether it
is a bug or a feature :
I use to have more than one onCorrespond scrip (I believe). Since I
installed Extension::SLA it seems that only the first scrip by Id is
called.

It seems to me that RT::Extension might have introduced that behaviour.

It may also be that I did not noticed it sooner.

However my diagnostic is that there is a 95% chance I introduced a
chair/keyboard bug.  ;)
What is your opinion ?

Since I find Extension SLA quite tough to use, I was thinking of using
Business::Date in a scrip to fix Due Date in two business Day. «use» works
or do I have to play with BEGIN {  } to had the INC paths ?

Thanks

--
Julien Tayon // digital craftsman // making things simpler (when possible)


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] TransactionObj OldValue is not working for me

2009-03-24 Thread Gene LeDuc
Apply a liberal dose of $RT::Logger and see what turns up.  I'd split your 
IF into 2 pieces and then stick a logger in the gap.  Something like

my $Trans = $self-TransactionObj;### because I'm a lazy typist
if ($Trans-Type eq Status)
{
   ### logger call to print value of -OldValue and -NewValue
   $RT::Logger-debug(( . $Trans-Id . ) oldvalue is  . 
$Trans-OldValueval ?. , newvalue is  . $Trans-NewValue);
   if ($Trans-OldValue ne autoclose  $Trans-NewValue eq resolved)
   {
blah blah
   }
}


At 12:51 PM 3/23/2009, slamp slamp wrote:
I have the following in my resolve scrip that I borrowed from the
site. I added the $self-TransactionObj-OldValue ne autoclose
portion but it does not seem to be working. Can anyone help? Basically
I don't want to get this notification if the status old value was set
to autoclose.

Condition: User defined
Action: Notify Ccs and Requestors
Template: Global resolved

Custom condition:

my $result = undef;

if ($self-TransactionObj-Type eq Status 
 $self-TransactionObj-OldValue ne autoclose 
 $self-TransactionObj-NewValue eq resolved)
{
 my $trans_list = $self-TicketObj-Transactions;
 my $trans;
 my $num_resolved = 0;

 while ($trans = $trans_list-Next)
 {
 $num_resolved++ if ($trans-Ticket == $self-TicketObj-Id) 
($trans-Type eq Status) 
($trans-NewValue eq resolved);
 }
 $result = ($num_resolved = 1);
}

return($result);
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Sending a notification from a scrip custom action

2009-03-04 Thread Gene LeDuc
Hi umm change+lists.rt,

Unless this has changed in the 3.8 line, you can't use a template to send 
an e-mail in a custom action.

The way I get around it is to use the custom action to set a trigger and 
then have another scrip (that uses that trigger as a custom condition) send 
the e-mail.

In our case, we don't use the priority field of the tickets for anything 
else, so my custom action assigns 5 to priority when I want to send an 
e-mail.  Then I have another scrip that sends the e-mail when the priority 
changes to 5.  You could use almost any unused field, or you could use a 
custom field.

Regards,
Gene

At 12:22 PM 3/4/2009, change+lists...@nightwind.net wrote:
How would I send a notification using a template from within a scrip
custom action?

The users for one RT instance I'm setting up wants to allow
correspondence on existing tickets via email, but not allow new tickets
to be created by email (there are some important mandatory custom fields
they want the user to fill out in the web interface).  I've changed the
default autoreply-on-create scrip to only reply for tickets not created
by email, and set up a new scrip that will check for new tickets created
by email and delete them.  I want it to also send a notification to the
ticket creator advising them to use the web interface instead.

(If there's a better way to do this, I'm open to ideas)


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Retroactive scrip-ing

2009-02-13 Thread Gene LeDuc
I think I'd write a perl script to read each ticket and then e-mail it back 
to RT.  Not very elegant and a significant bump in your mail server's 
workload, but you know that they would all be treated as new tickets.  This 
should be a pretty trivial script to write using the API.

Gene

At 08:14 AM 2/13/2009, Rob Munsch wrote:
I have queues, CFs, scrips and such set up more or less the way i want
them.  For now.  Until the department heads get back to me again.

While configging things, i collected about 10k tickets into the
General queue in various stages of completeness.  Other queues weren't
set up yet, CFs weren't being captured, etc. etc., so they remain in
General with empty CFs.

What would be the least-painful way of running all 10k of them thru
the system as if they were being created, i.e. having all scrips apply
to them now that we would have wanted when they came it?

Thanks,
Rob

--
/chown -R us:us /yourbase
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Create standard request forms with RT

2009-02-13 Thread Gene LeDuc
We use web pages to do this.  User goes to DNS request page, fills in form, 
php does some sanity-checking on the data, data gets formatted and mailed 
to RT, RT creates ticket in DNS queue.  Repeat for e-mail aliases, firewall 
rules, etc.

Gene

At 10:05 AM 2/13/2009, L B wrote:
Hello all,

  I use RT 3.8.2. People are creating tickets to request things, and
sometimes they forget some details. I would like to create a set of
standard request forms, ideally somewhere in RT, that will create
tickets with a summary of the details.

Exemple : request for an DNS entry will create a ticket in the DNS
queue, with me as an owner and with this content :

FQDN: something.bestpractical.com
IP: 10.1.1.1
TTL (optionnal): 3600
Description: new website for something


For example. This is filled in by the user in a form, the ticket can
be created with the rt command line, command by email, or anything
else.

I have more complex requests, for example a request for a new server,
that will create a ticket new server, with childs such as install
physically the server, request an IP, configure the DNS etc...
And I'll consider the server installed when all the child will be
resolved.

My problem is which tool can I use to create these forms ? Is there
something for this in RT or should I use something else ?

--
L.B.


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Fwd: Retroactive scrip-ing

2009-02-13 Thread Gene LeDuc
If you speak perl, I'll be happy to send you a copy of a script we use that 
would illustrate getting ticket info using the API.  If you don't speak 
perl, then I wouldn't recommend learning it with this script or this project.

At 02:17 PM 2/13/2009, Rob Munsch wrote:
On Fri, Feb 13, 2009 at 1:48 PM, Drew Barnes barne...@ucrwcu.rwc.uc.edu 
wrote:

  use the API to re-run those transactions

I have to confess, after some time googling and looking over the wiki,
that i cannot figure out how to do that :(.

--
/chown -R us:us /yourbase


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Scrip to selectively autorespond?

2008-12-08 Thread Gene LeDuc
Hi Atro,

Why not change the script condition that launches the AutoReply so that 
it's a user defined condition that checks for the common bulk headers in 
addition to the create condition?

Regards,
Gene

At 05:28 AM 12/7/2008, Atro Tossavainen wrote:
I was wondering if anybody has already dealt with the issue of RT either
autoresponding to all incoming messages or not autoresponding to any at
all.  Specifically, I'd like to try to implement recommendations of RFC
3834 in the autoresponder - such as, if RT gets mail from another auto-
responder that is easily identifiable as such, to stop generating loops.
Any pointers will be welcome.

--
Atro Tossavainen (Mr.)   / The Institute of Biotechnology at
Systems Analyst, Techno-Amish  / the University of Helsinki, Finland,
+358-9-19158939  UNIX Dinosaur / employs me, but my opinions are my own.
 URL : http : / / www . helsinki . fi / %7E atossava /  NO FILE ATTACHMENTS

-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Changing Password

2008-11-04 Thread Gene LeDuc
Give ModifySelf permission to Unprivileged.

At 07:34 AM 11/4/2008, Darvin Denmian wrote:
Hello List,

i need to know: there is a way to unprivileged users change their own 
password?

Thks !!
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] help with scrip

2008-10-27 Thread Gene LeDuc
Hi Violetta,

I've been on vacation so I didn't see your message until today.  I'm 
confused by your mail because there was no unless clause in any of the 
code that I saw or suggested.  The snippet you included doesn't have one 
either - it's a simple if conditional:
if ( A  ! (B || C) ) {
 do_this;
 and_this;
}

Where is the unless clause coming from?

Gene

At 11:53 PM 10/19/2008, Violetta Wawryk wrote:
Hi Gene,

good idea, thanks. But didn't work either. The scip is than always 
applicable and always applies the customfield which it should not do. *args*

I also tried unless, but than I get the errormessage:

Scrip 17 IsApplicable failed: syntax error at (eval 950) line 1, near 
-Subject unless

So I guess this strange perl doesn't know unless.

Somehow I cannot believe that noone ever tried something like this.

Frustated Greetings
Violetta


Gene LeDuc schrieb:
Hi Violetta,
Try this:
if ( $self-TransactionObj-Type eq Create 
  ! ( $self-TicketObj-Subject =~ /proje[c|k]t: /i ||
 $self-TicketObj-Subject =~ /akut: /i ) )
Regards,
Gene


--
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] help with scrip

2008-10-17 Thread Gene LeDuc
Hi Violetta,

Try this:

if ( $self-TransactionObj-Type eq Create 
  ! ( $self-TicketObj-Subject =~ /proje[c|k]t: /i ||
 $self-TicketObj-Subject =~ /akut: /i ) )

Regards,
Gene

At 02:59 AM 10/17/2008, Violetta Wawryk wrote:
Hi,

   if ($self-TransactionObj-Type eq Create 
 ($self-TicketObj-Subject !=~ /[P|p]roje[c|k]t: / ||
 $self-TicketObj-Subject !=~/[A|a]kut: / ) )
 
  I'm pretty sure that  is a higher precedence than ||, so the result
  without parentheses would be the same as ( ( A  B ) || C ) instead of
  ( A  ( B || C )) which is what you described.

I understand that now. Thank you. But I found out my scrip is not working 
because of the wrong regex.

$self-TicketObj-Subject !=~ /[A|a]kut: /  -- doesn't work
$self-TicketObj-Subject !~ /[A|a]kut: /  -- doesn't work

what would be the right expression to make it negative?

$self-TicketObj-Subject =~ /[A|a]kut: /  -- does work for positiv

Thanks
Violetta


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Template to include name of person who performed last action

2008-10-17 Thread Gene LeDuc
You probably want the creator of the transaction: 
$self-TransactionObj-CreatorObj-RealName

At 10:59 AM 10/17/2008, Helmuth Ramirez wrote:
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
 boundary=_=_NextPart_001_01C93082.0B746043

I’ve searched around for this, but I’m not sure I am searching the right 
keywords.  Here is what we would like to do:

We have a scrip that runs when someone changes a custom field to a 
particular value.  That triggers an e-mail to be sent based on a 
template.  I figured out how to include the value of the custom field, but 
what is the format to include the name of the person who performed the 
action to change this value?  Does that make sense?  Essentially, I would 
like to be able to pull the name that shows up in the audit logs “JoeSmith 
– comments added”, “JoeSmith – Status changed…”, etc.

Thanks everyone!
Helmuth


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Template to include name of person who performed last action

2008-10-17 Thread Gene LeDuc
Put curly braces around the perl stuff:

Updated by: {$self-TransactionObj-CreatorObj-RealName}


At 12:58 PM 10/17/2008, Helmuth Ramirez wrote:
Thanks Gene,
Although I'm clearing doing something wrong.  I am putting the following
in my template:

Updated by: $self-TransactionObj-CreatorObj-RealName

But the name doesn't show up, just the line I put in the template :(

Thanks

-Original Message-
From: Gene LeDuc [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2008 2:06 PM
To: Helmuth Ramirez
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Template to include name of person who performed
last action

You probably want the creator of the transaction:
$self-TransactionObj-CreatorObj-RealName

At 10:59 AM 10/17/2008, Helmuth Ramirez wrote:
 Content-class: urn:content-classes:message
 Content-Type: multipart/alternative;
  boundary=_=_NextPart_001_01C93082.0B746043
 
 I've searched around for this, but I'm not sure I am searching the
right
 keywords.  Here is what we would like to do:
 
 We have a scrip that runs when someone changes a custom field to a
 particular value.  That triggers an e-mail to be sent based on a
 template.  I figured out how to include the value of the custom field,
but
 what is the format to include the name of the person who performed the
 action to change this value?  Does that make sense?  Essentially, I
would
 like to be able to pull the name that shows up in the audit logs
JoeSmith
 - comments added, JoeSmith - Status changed..., etc.
 
 Thanks everyone!
 Helmuth


--
Gene LeDuc, GSEC
Security Analyst
San Diego State University


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] help with scrip

2008-10-16 Thread Gene LeDuc
Actually I think you should put the || phrase in parentheses like so:

  if ($self-TransactionObj-Type eq Create 
($self-TicketObj-Subject !=~ /[P|p]roje[c|k]t: / ||
$self-TicketObj-Subject !=~/[A|a]kut: / ) )

I'm pretty sure that  is a higher precedence than ||, so the result 
without parentheses would be the same as ( ( A  B ) || C ) instead of ( A 
 ( B || C )) which is what you described.

At 08:31 AM 10/16/2008, Violetta Wawryk wrote:

  my code looks like this:
 
  if ($self-TransactionObj-Type eq Create 
  $self-TicketObj-Subject !=~ /[P|p]roje[c|k]t: / ||
  $self-TicketObj-Subject !=~/[A|a]kut: / )
  --snip--

sorry, for bothering you. it actually works, the problem was something
else in my code which prevented my scrip to run through.

Bye
Violetta

-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT 3.8 - Ignore some email messages

2008-10-03 Thread Gene LeDuc

Hi Felipe,

If RT gets the message, it will always create the ticket, but you can use 
an OnCreate scrip to delete it ( $self-TicketObj-SetStatus(Deleted) ) 
if the subject line meets your criteria.  If you don't want a ticket to be 
created at all, you probably need to keep it away from RT 
altogether.  Blocking it before RT gets it will also reduce the number of 
users and groups cluttering up your database.  That said, I don't know how 
to block it with your mail software.


Regards,
Gene

At 09:09 AM 10/3/2008, Filipe José Silva Clemente wrote:

Hi,

I dont want RT to create new tickets ID if the subject message contains 
the expression we used in our old helpdesk response software.


How can i do this?
Ignoring the messages with fetchmail? (is this possible?)
By script telling RT to not create an incident to those messages? (RegEx?)


Any code samples? Ideas?

TIA,
Filipe
Portugal



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University  ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Auto assign of ticket to Open if taken by user

2008-10-02 Thread Gene LeDuc
Hi Johann,

Sorry to jump into your thread late, but another option is to use a scrip 
that fires when a ticket is taken and have it change the ticket status to 
Open.  If the following code syntax isn't quite right, it should be close 
enough to figure out.

Scrip condition: User Defined
if ($self-TransactionObj-Type eq Take) {
   return 1;
} else {
   return undef;
}

Scrip action: User Defined
{ $self-TicketObj-SetStatus(Open); }

Regards,
Gene

At 02:14 PM 10/2/2008, JohannS wrote:

Hi Emmanual.
Would i have to change this line on each section I find with the same code
or are there only a specific section where this code has to change?

Thanks
Johann


Emmanuel Lacour wrote:
 
  On Mon, Sep 29, 2008 at 06:21:30PM -0400, Johann Stander wrote:
  Hi.
 
  I have been trying to figure out to automatically change a ticket status
  to open as soon as the take button has been selected by a user.
 
  All users seems to forget to also click on the Open button after they
  click the take button which causes reporting problem.
 
 
 
  Here I made a TakeOpen link by editing html/Ticket/Elements/Tab and
  modify it like this:
 
  before:
  path  = Ticket/Display.html?Action=Takeid= . $id,
 
  after:
  path = Ticket/Display.html?Action=TakeStatus=openid= . $id,
 


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Auto assign of ticket to Open if taken by user

2008-10-02 Thread Gene LeDuc
Hi Johann,

Scrips are created in either the Queues or Global areas under the 
Configuration menu in the Web GUI.  You would create it in the queue that 
you want it to apply to, or, if you want this behavior in all of your 
queues, as a global scrip.

I borrowed the book from the school library while I was installing 
RT.  This was a couple of years and many brain cells ago, but I do remember 
that the book was pretty helpful in getting to understand scrips, 
templates, and the basics of ticketing systems.  It was still a pretty 
steep learning curve for me, though.

Regards,
Gene

At 04:00 PM 10/2/2008, JohannS wrote:

Hi Gene.
Not a problem at all, I always welcome some extra information.

This might sounds stupid but where will I be able to add this script for RT
when a ticket is created?

Do you perhaps have the RT book and is it worth getting now that the newer
version of 3.8.1 is out?

Thanks
Cheers
Johann



Gene  LeDuc wrote:
 
  Hi Johann,
 
  Sorry to jump into your thread late, but another option is to use a scrip
  that fires when a ticket is taken and have it change the ticket status to
  Open.  If the following code syntax isn't quite right, it should be close
  enough to figure out.
 
  Scrip condition: User Defined
  if ($self-TransactionObj-Type eq Take) {
 return 1;
  } else {
 return undef;
  }
 
  Scrip action: User Defined
  { $self-TicketObj-SetStatus(Open); }
 
  Regards,
  Gene
 
  At 02:14 PM 10/2/2008, JohannS wrote:
 
 Hi Emmanual.
 Would i have to change this line on each section I find with the same code
 or are there only a specific section where this code has to change?
 
 Thanks
 Johann
 
 
 Emmanuel Lacour wrote:
  
   On Mon, Sep 29, 2008 at 06:21:30PM -0400, Johann Stander wrote:
   Hi.
  
   I have been trying to figure out to automatically change a ticket
  status
   to open as soon as the take button has been selected by a user.
  
   All users seems to forget to also click on the Open button after
  they
   click the take button which causes reporting problem.
  
  
  
   Here I made a TakeOpen link by editing html/Ticket/Elements/Tab and
   modify it like this:
  
   before:
   path  = Ticket/Display.html?Action=Takeid= . $id,
  
   after:
   path = Ticket/Display.html?Action=TakeStatus=openid= . $id,
  


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] notify by queue change

2008-09-30 Thread Gene LeDuc
Robert, if the AdminCC is the one who does the queue change, RT will not 
send him or her an e-mail unless you have NotifyActor set in your 
RT_Siteconfig file.


Regards,
Gene

At 10:22 AM 9/30/2008, Robert Keidel wrote:
I try to get a notify mail to all queue members as soon a new ticket comes 
in. I believe I found it somewhere in the wiki and I created a scrip that 
notifies AdminCC.


Condition: On Queue Change
Action: Notify AdminCC
Template: Global Template Transaction
Stage: TransactionCreate

I can see in the message log that it will notify AdminCC since Scrip 18 is 
the scrip I created, but in my mail.log file of the postfix stays empty. 
No out going email.


Here is the part from the message log:
Sep 30 10:18:20 testlinux RT: 
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] 
#635/8243 - Scrip 18 QueueTransfer 
(/opt/rt38/bin/../lib/RT/Action/SendEmail.pm:302)
Sep 30 10:18:20 testlinux RT: 
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] 
No recipients found. Not sending. 
(/opt/rt38/bin/../lib/RT/Interface/Email.pm:338)


Any help would be much appreciated.

Robert Keidel



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] RT 3.8 - Create New ticket when a requestor send an email with a resolved ticket

2008-09-30 Thread Gene LeDuc

Hi Felipe,

This sounds interesting.  I think I would try stripping the ticket info 
from the incoming e-mail (subject line and header line) and then forward it 
to an address set up for the predetermined queue.


So...
1. Incoming e-mail triggers the scrip.  This is the easy part.
2. Modify the subject line to remove the ticket reference.  Not hard to do.
3. Remove the RT-Ticket: header.  I don't know how to do this, but I'm sure 
it can be done.
4. Forward the message to the other queue's address without adding an 
RT-Ticket: header or putting the ticket info into the subject line.  I came 
up with one way to do the subject line part a while ago 
(http://wiki.bestpractical.com/view/SendEmail).  Blocking the RT-Ticket: 
header will probably require some digging into RT's code, but it shouldn't 
be Really Hard if you are comfortable with perl.
5. RT receives the e-mail and creates a new ticket in the other 
queue.  This is the easiest part because it's what RT already does!


Not trivial, but you'll learn a lot about RT if you pull it off.

Or, if you're lucky, someone else will post a much easier way to do this.

Regards,
Gene


At 03:12 PM 9/30/2008, Filipe José Silva Clemente wrote:

Hi,

I want RT 3.8 to create a new ticket on a predefined queue when a user 
reply by email to a resolved ticket.
The new ticket must have in the subject “Reopen:” and the new ID. An email 
must be sent automatically to the requestor informing the new ID.


Does anyone have a script with this functionality? Any links or clues?

TIA,
Filipe
Portugal



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] OnQueue change script

2008-09-29 Thread Gene LeDuc

Hi Filipe,

Your first question is a pretty simple thing to do.  Create an e-mail 
template in your helpdesk queue that has the text of the e-mail you want 
the user to get (make sure you leave the first line of the template 
blank).  Create a new scrip in the helpdesk queue.  Select On Queue 
Change for Condition.  Select Notify Requestors for Action.  Select the 
template you just created for Template.  That's it!


If I'm not mistaken, you don't have to do anything for things to work the 
way you describe in your second question.  As long as the ticket number 
stays in the subject line, it should get added to the ticket history when 
the external group replies to the e-mail that your helpdesk forwarded.


Regards,
Gene

At 03:13 PM 9/29/2008, Filipe José Silva Clemente wrote:
I have a queue called Entrance where the RT puts all emails received by 
my helpdesk email address. This queue doesnt send an automatic ticket ID 
email to the requestor.


I have another queue called helpdesk used for the work team to move 
tickets from entrance to helpdesk. I want to send an email to the 
requestor notifying the ticket ID only when my team moves the ticket from 
the queue entrance to the queue helpdesk.


Do u have any acript to do this? Any clues or website links?

Another question:

My helpdesk team forwards a ticket by email to an external support team. 
Then i want the external support team to comment the ticket and send it 
back by email to RT and be added to the ticket history. What is the best 
way to implement this?



TIA,

Filipe Clemente
Portugal



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] email sender not ticketowner in template correspondence

2008-09-16 Thread Gene LeDuc
Hi Bertel,

It sounds like you want to use the Transaction Creator instead of the 
Ticket Owner.  Try using
   $Transaction-CreatorObj-EmailAddress()

Gene

At 02:05 AM 9/16/2008, Alro Group wrote:
Hi all,

At this moment i have this template:
RT-Attach-Message: yes
Helpdesk Correspondent: {$Ticket-OwnerObj-EmailAddress} (Tel.: 
{$Ticket-OwnerObj-WorkPhone})
{$Transaction-Content()}
--
{$RT::WebURL}Ticket/Display.html?id={$Ticket-id}


{$Ticket-OwnerObj-EmailAddress}  gives me the email address of the 
ticket owner, but I want to use the email address of the person who is 
actually entering an answer.

Can someone help me with this?
Is there a list available online of variables I can use in the template 
changer?

Best regards,

Bertel


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] scrips/template issue

2008-09-16 Thread Gene LeDuc

Hi Robert,

If you are both the requestor and the person who resolves the ticket, by 
default you won't get an e-mail.  By default, RT never (except for 
autoreply) sends the person who does the transaction an e-mail because it 
assumes you know what you did.  To change this behavior, set the 
NotifyActor variable in your RT_Siteconfig file to 1 and restart your web 
server.


I you are testing this with a ticket where the resolver and requestor are 
different, then there's a different problem.


Regards,
Gene

At 10:54 AM 9/16/2008, Robert Keidel wrote:

Hello,

I have an issue with the scrip/template on resolve. I changed the 
original template of that scrip with a template I wanted to use. 
Unfortunately it did not work, it did not send out an email on resolve. 
So I went back to the template what worked before just fine, but RT is 
still not sending out any email when I resolve a ticket. What did I do 
wrong? I hope you guys understand what I try to explain here. I also tried 
to enable logging in RT_SiteConfig.pm to see what is going on, but that 
did not work either. I am running on Ubuntu 8.04 server; mysql5; apache2; 
fastcgi and the RT version is http://3.6.6.3.6.6. Thank you for any clue 
you can give me.


The scrip and template:

Description: empty
Condition: On Resolve
Action: Notify Requestors
Template: Global template: Resolved
Stage: TransactionCreate

The template:
Name: Resolved
Description: Ticket Resolved
Content:
Your request has been completed 
If you have any further questions or concerns, please respond to this message.

The IT Service Team



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Email works for AutoReply, and Forwarding but not Resolve or Reply

2008-09-10 Thread Gene LeDuc
Hi Janice,

If the person creating the transaction is the requestor, then by default RT 
will not Reply (even if the selected action is Reply to Requestor); that 
seems to be one of the main differences between Autoreply and Reply.  If 
your case is not one where the requestor is the transaction creator, then 
this doesn't apply to you.  Otherwise... You can change this behavior by 
setting the NotifyActor variable in your RT_SiteConfig file:
   Set($NotifyActor, 1);

Regards,
Gene

At 02:28 PM 9/10/2008, Janice Myint wrote:
Working on RT 3.8.0 with a fresh install.  Everything seems to be
working like a creating a ticket, change status etc.  However, when I
change the update type to Reply to Requestors, no email is sent, even
though the autoreply and forward emails work.  Seems like a config
issue but I can't seem to find out where to set it.  Looking for any
advice on where to look.


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to get RT to use Reply-To for returned emails

2008-09-08 Thread Gene LeDuc
Hi John,

It's possible to access the headers of the original e-mail in an on-create 
scrip and then change the requestor to whatever is found in the reply-to 
header.  You would have to create a new user for the reply-to address if 
that user does not already exist.  You might end up with a bunch of bogus 
users unless you also delete the original requestor/user after changing to 
the new one because RT creates the user before the on-create trigger 
happens (you might have to shred it, I'm not sure).  And if there is no 
reply-to header then obviously you wouldn't change the requestor.  Doing 
this might present some surprise gotchas as well, so be prepared.

Another thought is to change the requestor's userid to the reply-to 
address.  This seems like it would be cleaner, but I've never done it and 
don't know whether it is feasible.  If the user already exists, then you 
change the requestor to that user.  You still need to delete any bogus user 
that gets created.

I think this will get you the Reply-To header:
   my @ReplyTo = 
$self-TicketObj-Transactions-First-Attachments-First-GetHeader('To');

but you might be able to simplify it to:
   my @ReplyTo = 
$self-TransactionObj-Attachments-First-GetHeader('Reply-To');

Give it a shot and have fun!

Regards,
Gene

At 11:27 AM 9/8/2008, John  BORIS wrote:
In my setup my users are sending emails to RT from a machine where their
email address isn't valid. It is hard to explain. The corporate email
address for my users is not the same as their login and email address on
the server where the email is originating. We use Mutt as the client.
The emails are sent from inside a program the user is running.
It is like this
User's login to server: joed
email address on that server: [EMAIL PROTECTED]
Corporate email is [EMAIL PROTECTED]
REPLY-TO [EMAIL PROTECTED]

The user sends the email to RT from the application on the server. Mutt
sends the email to RT and RT takes it and processes it. It correctly
adds the ticket to the proper Queue but it then sends the reply back to
the From address not the REPLY-TO address. This reply is then refused by
the local server.

Is there a way to have RT use the REPLY-TO field for replies instead of
the From field? Or is the REPLY-TO field not set in all email clients?


I hope I gave enough info.

TIA


John J. Boris, Sr.
JEN-A-SyS Administrator
Archdiocese of Philadelphia
Remember! That light at the end of the tunnel
Just might be the headlight of an oncoming train!
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Delayed scrip

2008-08-29 Thread Gene LeDuc
Hi Jerrad,

Easy: Sort of
Elegant: Nope

One way to do this is to create a custom field (or use an unused field) for 
the queue.  Your on-create scrip puts some Needs to be acknowledged value 
into the field.  You create a blank template in your queue named AutoReply 
so no on-create mail gets sent for this queue.  Then you use a cron script 
to harvest the tickets that have the Needs to be acknowledged value set 
in the custom field, send the e-mails, and then delete the custom field 
value so you don't send a dupe the next night.

Should work and shouldn't be too tricky to set up.  Not pretty, though, and 
definitely not elegant.

Regards,
Gene

At 11:54 AM 8/29/2008, Jerrad Pierce wrote:
Hey all,

Is anyone aware (nothing on wiki or archives that I could see) of an 
easy/elegant way to purposefully delay the delivery of OnCreate messages?
We're using RT to accept new clients, but then are syncing the data with 
our call center on a nightly basis, so we want to wait until that happens
before notifying the user...

Thanks!


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Design/usage question

2008-08-25 Thread Gene LeDuc
Hi Jerrad,

I used a custom field to emulate custom states for a process that required 
a ticket to change queues several times.  A certain request comes in to the 
security office and they create a ticket in their queue.  A scrip 
immediately moves the ticket into the network queue where it prompts the 
techs to kill the user's network connection.  They do so and record their 
action, which causes the ticket to return to the security queue and stall 
itself.  User notices that he is no longer on the network so he starts 
calling around and eventually ends up talking to security.  Security sends 
him a letter and updates the ticket, the ticket stays stalled.  When user 
signs and returns the letter, security notes it and the ticket goes back to 
the network queue where the techs are prompted to restore the 
connection.  They do so and record the action, which causes the ticket to 
return to the security queue where it sits until security reviews it and 
marks it resolved.  At each step the custom field gets changed by a person, 
a scrip, or a template, and this change triggers the next action.  It's 
clunky, but it works well for us.

It may not be the best answer for your situation, but it is something to 
consider.  We are using 3.6.3, so there might be better ways to do this in 
3.8 that I don't know about.

Regards,
Gene

At 07:47 PM 8/24/2008, Jerrad Pierce wrote:
I have users who want to use RT to track an elaborate multi-step process, 
namely to
determine how far-along individual projects are. Does anyone have  any 
experience with this,
or recommendations for doing so?

The original idea was for the creation of a ticket in the queue to spawn 
the creation of child
tickets for every step in the process. I fear this will be rather 
cumbersome, and may result
in correspondence being spread across far too may tickets.

I've since been considering a (multi)select CF, but it seems like it'd be 
rather easy to ignore,
and we already have over two dozen CF on these tickets.

Custom states are another possiblity, but there are 12 steps, and that 
seems extremely unweildy.

Thanks in advance,

Jerrad


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Global scrips/templates vs queue specific scrips/templates

2008-07-31 Thread Gene LeDuc
Hi Jason,

Unless things have changed radically between 3.6.5 and 3.8, if a global 
scrip is enabled it will always run when the trigger conditions are met; 
you can't turn a global scrip off for specific queues.

Templates work differently, though.  A global template (like Autoreply) can 
be overridden in a queue by creating a template in the queue with the same 
name as the global template.  RT will see the template in the queue and use 
it instead of the corresponding global template.

Regards,
Gene

At 08:19 AM 7/31/2008, Jason Doran wrote:
Hi,

RT has global scrips that apply to all queues. Is there a way to leave
these scripts completely alone and simply to stop a global script from
running on a specific queue?

For example we have the following global scrip:-

Description:On Create Autoreply To Requestors
Condition:  On Create
Action: Autoreply to Requestors
Template:   Global template: Autoreply
Stage: Transaction Create

Suppose I have a queue that I want a slightly different Autoreply on.
How do I set things up so that all other queues get the standard
Autoreply, but a specific queue gets a different scrip/template only.
At the moment I get *two* emails when I submit to this other queue.
One from the global script/template and a  queue specific one.

Is this even possible or is there a better way to do this? I know I
could disable the global script, but then I would have to have an
Autoreply setup for all other queues. Any help or just some pointers
would be great.

I am still getting my head around how RT works and I don't want to
make silly workflow decisions before rolling this out.

Regards,
Jason Doran,
National University of Ireland, Maynooth


___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Send AdminCc notify email from inside custom action?

2008-07-18 Thread Gene LeDuc

Hi Dan,

The only way I was able to figure out to send an e-mail as part of a 
user-defined action scrip is to have the scrip that does the user-defined 
action also set a value in another field, and have that field change 
trigger a Notify scrip.  We don't use ticket priorities here, so I use the 
priority field to control process flow (I've also done the same thing using 
a custom field).  In your case, I'd have your scrip add someone to the 
ticket's admincc group and then set a value in a CF called Flow.  Then 
I'd create another scrip that triggers when Flow changes to that specific 
value; this scrip would do the notification.


I'm sure there are more elegant ways to do this, but I never found them and 
this works for us.


Regards,
Gene

At 08:12 AM 7/18/2008, Dan Lowe wrote:
I have been looking to implement automatic Cc adds for new users copied 
into threads, taking the code here and adapting it:


http://wiki.bestpractical.com/view/AddWatchersOnCorrespond#http://wiki.bestpractical.com/view/AddWatchersOnCorrespond#

I have created 2 custom scrips based on that, one that triggers on Create 
and another on Correspond. (I am not using $ParseNewMessageForTicketCcs 
because I only want this on specific queues).


The add-Cc's function is working perfectly. However, we like to generate 
an email notify whenever we have made a change to a ticket's state. I am 
trying to find a way to generate an AdminCc notification that one or more 
Cc's were added to the ticket, and I would assume that needs to happen 
within the custom action cleanup code, after the Cc-add processing has 
been finished.


I've looked around on the wiki, Google, and looked through O'Reilly's RT 
Essentials book on Safari Online, but I can't see a way to make this 
happen. I've tried getting the AdminCc list with code similar to this:


$adminccs = $self-TicketObj-AdminCcAddresses;

But I get a blank return using that. I've also tried using RT::User-new 
and grabbing data from the returned object, but I get Perl errors about 
the method not being implemented (even if I use RT::User).


All I really need is either a way to get the admincc list, and then a way 
to send an email, or a packaged-up method that knows how to get the 
admincc list itself, that I can pass a message text to. Does such an 
animal exist?


Thanks in advance for any help. I feel like I'm beating my head against a 
wall at this point.


Dan



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Changing Queue reference in emails

2008-07-14 Thread Gene LeDuc
Hi Kevin,

I think that's the purpose of the fields on the Basics tab when editing a 
queue's configuration.  For instance, in my Support queue the Description 
is Support Requests and the Reply Address is 
[EMAIL PROTECTED].  Replies to tickets are from Support Requests 
[EMAIL PROTECTED].

Regards,
Gene

At 03:20 PM 7/14/2008, Kevin Freels wrote:
Greetings!

I would like the response emails (comment, reply) to reflect the queue
that they're generated from, not the RT instance. We have multiple
queues, and I think it will get confusing to have the messages say I.T.
Support when the ticket generated is actually from the Engineering
queue.

How is this done? Do I need to create a whole new series of templates
for each queue?

Thanks, as always

k
-=-=-=-
Kevin Freels
Director of Information Technology
Sendmail, Inc.
[EMAIL PROTECTED]  510/594.5572
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Reminder Emails

2008-07-09 Thread Gene LeDuc

Hi Bill,

I do something kind of like that.  When a ticket is created in a queue that 
I want reminders sent on, I have an OnCreate scrip put a value into a CF 
named 'NagDays'.  This value determines when reminders should be sent on 
each ticket (send reminder if now() is within NagDays of DueDate).  If 
NagDays is empty then no reminder is sent.  The reminders are sent from a 
perl script that runs via cron.  I started with a script I found on the 
wiki, but then modified it quite a bit to use Business::Hours, individual 
(per ticket) NagDays values, logging of reminders, etc.  If you only want 
to do it for specific tickets (rather than every ticket in a queue) then 
leave out the OnCreate scrip and manually put a value into the NagDays CF 
for each ticket that you want reminders sent for.  I usually set NagDays to 
2 for queues in which I use reminders so that 2 days before the due date 
the owner and adminccs start getting reminded that the due date is 
approaching.  If the ticket is past due then I change the wording of the 
nag message.  If you want, I'll be happy to send you the script (I think I 
sent it to the list sometime last year).


Regards,
Gene

At 10:46 AM 7/9/2008, Candelario, Bill wrote:
Would it be possible to send a reminder on a specific ticket.  What I'm 
trying to accomplish is, on creating a ticket, setting a reminder (as in 
MS Outlook) that would notify me via email.  If I set a reminder for 1 
week from today to do a task, I would want to be reminded on that day.


Thanks,
Bill



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Reminder Emails

2008-07-09 Thread Gene LeDuc
The trigger for generating a reminder is a value in a custom field named 
NagDays.  That value can be set via an OnCreate scrip (which is the way I 
do it) or manually by a user via the RT webgui.  If NagDays doesn't exist 
or doesn't have anything in it, then the ticket is ignored.  I'll send you 
the perl script off-list.


Gene

At 12:02 PM 7/9/2008, Candelario, Bill wrote:
Thanks, Gene.  If you don't mind sending the scrip, sure.  In reading how 
you set the reminders, is this only when creating tickets?  What I mean 
is, can other owners set the reminders after the ticket is created?


-Bill


--
From: Gene LeDuc [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2008 2:40 PM
To: Candelario, Bill
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Reminder Emails

Hi Bill,

I do something kind of like that.  When a ticket is created in a queue 
that I want reminders sent on, I have an OnCreate scrip put a value into a 
CF named 'NagDays'.  This value determines when reminders should be sent 
on each ticket (send reminder if now() is within NagDays of DueDate).  If 
NagDays is empty then no reminder is sent.  The reminders are sent from a 
perl script that runs via cron.  I started with a script I found on the 
wiki, but then modified it quite a bit to use Business::Hours, individual 
(per ticket) NagDays values, logging of reminders, etc.  If you only want 
to do it for specific tickets (rather than every ticket in a queue) then 
leave out the OnCreate scrip and manually put a value into the NagDays CF 
for each ticket that you want reminders sent for.  I usually set NagDays 
to 2 for queues in which I use reminders so that 2 days before the due 
date the owner and adminccs start getting reminded that the due date is 
approaching.  If the ticket is past due then I change the wording of the 
nag message.  If you want, I'll be happy to send you the script (I think I 
sent it to the list sometime last year).


Regards,
Gene

At 10:46 AM 7/9/2008, Candelario, Bill wrote:
Would it be possible to send a reminder on a specific ticket.  What I'm 
trying to accomplish is, on creating a ticket, setting a reminder (as in 
MS Outlook) that would notify me via email.  If I set a reminder for 1 
week from today to do a task, I would want to be reminded on that day.


Thanks,
Bill



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Disabling autoreplies for one (or a minority of) queues?

2008-07-07 Thread Gene LeDuc
Hi Howie,

To disable autoreplies, create a blank template in the desired queue(s) and 
name it Autoreply.

Regards,
Gene

At 05:27 AM 7/7/2008, Howard Jones wrote:
I have a need to stop autoreplies for a couple of queues in our RT system.

I've found a couple of posts suggesting that creating a queue-specific
'Correspondence' template that's blank will disable autoreplies, but all
I get is the normal global autoreply. Looking at RT::Action::Autoreply,
I don't see anything that looks at the content of the template either,
but I'm not too familiar with RT's guts.

Is there some other part of this trick that I'm missing? (this is RT
3.6.4 on CentOS 4 with MySQL 4.1)

Thanks for any pointers,

Howie


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT Ticket creation

2008-07-03 Thread Gene LeDuc
The most common way I've seen this done (user data - php form - RT 
ticket) is to have php do a sanity check on the form data and then e-mail 
it to RT.  If you want the data shoved into custom fields, you can have an 
OnCreate scrip in RT do it and you never have to touch the database.


Regards,
Gene

At 05:50 AM 7/3/2008, Caglar wrote:

Hello everybody,

 I have just started to develop a web application with RT. But I have 
some problems

that I couldn't solve . I will be so grateful to you, if anyone can help me.

I have a php form in which users enter an incident and submit it. 
Then the app sends an
email to the person in charge of the incident. I am storing the datas from 
the form to the
Tickets and Users tables in the RT's database in order to create a ticket 
in RT. But the sad
part is, when I login to the RT with my root account, I couldn't see the 
ticket that PHP app
created from the RT's web interface . Php form inserts the datas to the 
database from the

forms successfully. And my questions are:
   * Why RT doesn't see the datas that I've inserted into the RT's database?
   * How can I create a ticket outside the RT?
   * Does RT needs to modify a file in order to create a new ticket?
   * Can I use the RT's builtin ticket creation interface without 
authentication?

FYI: I am using RT 3.6.6 and Mysql 5.1, Apache 1.3.9 on FreeBSD.

Yours,
Ça lar Gülçehre

-
Ça lar Gülçehre
Tübitak Ulakbim
BlackSea Interconnection


___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Scrips (queue change notify)

2008-06-02 Thread Gene LeDuc
Hi Kristian,

In addition to what Toby mentioned about NotifyActor, you only need to put 
the scrip in the receiving queue.  If a ticket moves from OldQueue to 
NewQueue, the scrip in NewQueue will fire but the one in OldQueue will not.

Regards,
Gene

At 01:04 AM 6/2/2008, Kristian Davies wrote:
I'm trying to create a notification email on the receiving queue when
a ticket is moved.  I have two queues (test1 and test2), and I've
added a scrip to both:

Description: Queue Notify
Condition: On queue change
Action: Notify requesors, CC and AdminCC
Template: Global template: Transaction
Stage: TransactionCreate.

I am the requestor and adminCC.

Still does not send the email.  I thought that would be enough.

Any help would be appreciated.

-Kristian
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Privilege only on a ticket but not to the whole queue

2008-05-27 Thread Gene LeDuc

Hi Asif,

You could add group1 to the list of Requestors for the ticket and then 
grant Requestors (either globally or within queue2) ShowTicket and 
ModifyTicket rights.  The Requestors stay with the ticket when it changes 
queues.  Use a scrip to add group1 to the Requestors when it goes from 
queue1 to queue2.


Gene

At 11:00 AM 5/27/2008, Asif Iqbal wrote:
I have a group `group1' who sometimes drop a ticket from their queue 
`Queue1' to our queue `Queue2' as part of the requirement.
Now is it possible to give that group `group1' read/write access *only* to 
the ticket(s) they drop on queue `Queue2' and no read or

read/write access to other tickets in that queue, `Queue2' ?

Thanks

--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: http://pgp.mit.edupgp.mit.edu



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] RT 3.6.6 - httpd won't start

2008-05-13 Thread Gene LeDuc
Hi Shannon,

While this probably wouldn't keep httpd from starting, I'm pretty sure that 
underscores are not legal characters in a host name.  Hyphens yes, 
underscores no.  Making sure that the host name conforms to whatever the 
current RFC says might prevent future head-scratchers.

Regards,
Gene

At 02:04 PM 5/13/2008, Shannon Adams wrote:
I went through the manual installation Wiki and cleaned up my rt3.conf.  I 
think it should be correct now.  However, httpd won't start.  Here is what 
I get in the error_log:

Tue May 13 15:46:51 2008] [error] Can't locate Apache2.pm in @INC (@INC 
contains: /opt/rt3/local/lib /opt/rt3/lib 
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi 
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi 
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi 
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi 
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 
/usr/lib/perl5/site_perl 
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi 
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi 
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi 
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi 
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 
/usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi 
/usr/lib/perl5/5.8.8 . /etc/httpd) at (eval 209) line
3.\n
[Tue May 13 15:46:51 2008] [error] Can't load Perl module Apache2 for 
server itadmin_test.bigrocksports.com:0, exiting...


httpd -v shows:
Server version: Apache/2.2.8 (Unix)
Server built:   Jan 28 2008 06:24:44

rt3.conf:
VirtualHost 10.9.10.251
ServerName itadmin_test.bigrocksports.com
DocumentRoot /opt/rt3/share/html
AddDefaultCharset UTF-8

# this line applies to Apache2+mod_perl2 only
# Below line might be incorrect, I had to use:
# PerlModule Apache2::compat
# mod_perl 2.0.1 from FC4 Linux
PerlModule Apache2 Apache::compat

   Alias /rt /opt/rt3/share/html
   PerlModule Apache::DBI
   PerlRequire /opt/rt3/bin/webmux.pl

   Directory /opt/rt3/share/html
 AllowOverride All
 Options ExecCGI FollowSymLinks
 IfModule mod_access.c
 Order allow,deny
   Allow from all
 /IfModule
   /Directory

   Location /rt
 RewriteEngine On
 RedirectMatch permanent (.*)/$ $1/index.html
 AddDefaultCharset UTF-8
 SetHandler perl-script
 PerlHandler RT::Mason
   /Location

/VirtualHost

Do you see anything that would cause httpd not to start?

Shannon


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT 3.6.3; how to have queue-specific scrip override global?

2008-05-09 Thread Gene LeDuc
Maurice, you want the queue template to have the same name as the global 
template - that's how you can get away with using a single global 
scrip.  When RT is told to use a global template, it checks first to see if 
there's one in the active queue with the same name and, if it finds one, 
uses it instead.

Make sure that you have a blank line as the first line in the template.  If 
you don't, the template probably won't produce anything.

Gene

At 07:47 PM 5/8/2008, Maurice Chung wrote:
Hi Gene (and Kenneth) -

The global scrip I want to override, executes 'On Create Autoreply To 
Requestors with template name_of_our_template' - which just sends an 
email on ticket creation.

I created a queue-specific template of the same name as above 
(name_of_our_template) but rather than sending the reply email with 
the new, local template version, it doesn't send an email at all.

The one thing I'm wondering if it's the problem, is that the name of the 
global scrip that's being executed (the one referenced in the first 
paragraph above) has the same name as the template (both global and local) 
- could this be an issue?

If this doesn't pan out, we may try installing this patch:
(bottom of page)
http://page.mi.fu-berlin.de/pape/rt3screenshots/

Thanks again sirs!
maurice
ps. Turning off global scrips and reinstating them for each queue except 
the one, did occur to me, but seemed so inelegant =)  but I guess in the 
end if I have to go that route, I shall!


- Original Message -
From: Gene LeDuc [EMAIL PROTECTED]
To: Maurice Chung [EMAIL PROTECTED]
Cc: rt-users rt-users@lists.bestpractical.com
Sent: Monday, May 5, 2008 9:26:58 AM (GMT-0800) America/Los_Angeles
Subject: Re: [rt-users] RT 3.6.3; how to have queue-specific scrip 
override global?

Hi Maurice,

If the global scrip is one that sends e-mail and you just want the to send
a different e-mail, you can create a template of the same name in your
queue.  Unlike scrips, queue templates override global templates of the
same name.

If the global scrip doesn't send e-mail (like On Correspond Open Tickets
with template Blank) then you can change the condition of the global scrip
to User Defined and then put the same condition into the Custom Condition
area, but with an additional check for the queue you want to ignore.  This
should work fine for a single queue, but it could become very ugly to
maintain when you start add queues to your list of ones that particular
scrips shouldn't apply to.  I ended up disabling all global scrips and
putting what I needed in each queue.

A nice feature for global scrips would be a way of disabling them for
specific queues - an exceptions list maybe.

Regards,
Gene

At 05:17 PM 5/2/2008, Maurice Chung wrote:
 Hello,
 
 We have a queue-specific scrip that we'd like to override a global scrip
 with the same conditions; I found this patch:
 http://page.mi.fu-berlin.de/pape/rt3screenshots/
 but was wondering if there was a way in RT (ver. 3.6.3) that I am not
 aware of, of doing this?
 
 Looked through the RT Wiki pages on scrips but no dice =)
 
 Thanks all -
 maurice


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT 3.6.3; how to have queue-specific scrip override global?

2008-05-05 Thread Gene LeDuc
Hi Maurice,

If the global scrip is one that sends e-mail and you just want the to send 
a different e-mail, you can create a template of the same name in your 
queue.  Unlike scrips, queue templates override global templates of the 
same name.

If the global scrip doesn't send e-mail (like On Correspond Open Tickets 
with template Blank) then you can change the condition of the global scrip 
to User Defined and then put the same condition into the Custom Condition 
area, but with an additional check for the queue you want to ignore.  This 
should work fine for a single queue, but it could become very ugly to 
maintain when you start add queues to your list of ones that particular 
scrips shouldn't apply to.  I ended up disabling all global scrips and 
putting what I needed in each queue.

A nice feature for global scrips would be a way of disabling them for 
specific queues - an exceptions list maybe.

Regards,
Gene

At 05:17 PM 5/2/2008, Maurice Chung wrote:
Hello,

We have a queue-specific scrip that we'd like to override a global scrip 
with the same conditions; I found this patch: 
http://page.mi.fu-berlin.de/pape/rt3screenshots/
but was wondering if there was a way in RT (ver. 3.6.3) that I am not 
aware of, of doing this?

Looked through the RT Wiki pages on scrips but no dice =)

Thanks all -
maurice


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Send last message/comment from ticket to requestor on resolve

2008-05-05 Thread Gene LeDuc

Nelson,

Here's how I include the resolver's message with our standard resolved 
blurb.  This is my (slightly modified) template for OnResolve.  The guts of 
what you want to do is that I grab the last correspondence, compare it to 
the last outgoing e-mail (don't include it if they're the same), then see 
if it's incoming e-mail (don't include it if so).  If it passes those 
tests, then I include it in my standard blurb to the requestor.  There are 
probably cleaner ways to do this, but I'm using this in production and it 
works.


Regards,
Gene

= start of template contents
{ ### Tells user that ticket has been resolved
  my $MyName = Template 28 (Resolved);
#$RT::Logger-debug($MyName (. $Transaction-Id . ) entered.);
  my $FromAddress = 'RT Requests [EMAIL PROTECTED]';
  my $ContactAddress = '[EMAIL PROTECTED]';
  my $OwnerName = $Ticket-OwnerObj-RealName;
  my $c_content;
  my $e_content;
  my $have_rmks;
  my $remarks;

  ### We won't include a comment if...
  ### - Last outgoing email content eq last correspond content (this means
  ###   that the content was already sent in an e-mail)
  ### - Last correspond attachment headers =~ /^Received/ (this means that
  ###   the correspond was an incoming e-mail)

  ### Get last Correspond
  my $Transactions = $Ticket-Transactions;
  $Transactions-Limit( FIELD = 'Type', VALUE = 'Correspond' );
  $Transactions-OrderByCols (
 { FIELD = 'Created',  ORDER = 'DESC' },
 { FIELD = 'id', ORDER = 'DESC' },
  );
  my $CorrespondObj = $Transactions-First;
  if ($CorrespondObj  $CorrespondObj-Id) {
$c_content = $CorrespondObj-Content;
chomp $c_content;
$have_rmks = !$CorrespondObj-Attachments-First-GetHeader('Received');
#$RT::Logger-debug($MyName: found correspondence: '$_content') if 
$have_rmks;

  }

  ### Get last outgoing e-mail
  $Transactions = $Ticket-Transactions;
  $Transactions-Limit( FIELD = 'Type', VALUE = 'EmailRecord' );
  $Transactions-OrderByCols (
 { FIELD = 'Created',  ORDER = 'DESC' },
 { FIELD = 'id', ORDER = 'DESC' },
  );
  my $EmailObj = $Transactions-First;
  if ($EmailObj  $EmailObj-Id) {
$e_content = $EmailObj-Content;
chomp $e_content;
if ($c_content) {
  $have_rmks = 0 if $e_content eq $c_content;
  $have_rmks = 0 if $EmailObj-Id  $CorrespondObj-Id;
}
  }

use Mail::Address;
  my $Cc = '';
  my $Bcc = '';
  if ( $have_rmks ) {
my $attachment = $CorrespondObj-Attachments-First;
my @cc_addrs = Mail::Address-parse($attachment-GetHeader('RT-Send-Cc'));
my @bcc_addrs = 
Mail::Address-parse($attachment-GetHeader('RT-Send-Bcc'));

foreach my $addr ( @cc_addrs ) {
  $Cc .= $addr-address . , ;
}
$Cc .= $Ticket-QueueObj-Cc-MemberEmailAddressesAsString;
$Cc =~ s/, $//;

foreach my $addr ( @bcc_addrs ) {
  $Bcc .= $addr-address . , ;
}
$Bcc .= $Ticket-QueueObj-AdminCc-MemberEmailAddressesAsString;
$Bcc =~ s/, $//;
  }

  ### Set the remarks if applicable
  if ($have_rmks) {
$remarks = 
Comments:

$c_content
;
#$RT::Logger-debug($MyName: going to send comments: $remarks);
  }
  my $AddressGroup = From: $FromAddress;
  $AddressGroup .= \nCc: $Cc if $Cc;
  $AddressGroup .= \nBcc: $Bcc if $Bcc;
  $OUT = $AddressGroup
Subject: Action completed for your request

The ticket that was opened for your request has been resolved by 
$OwnerName.  If you have any questions about this, you can contact us at 
$ContactAddress.

$remarks

Regards,
The IT Staff;

}
= end of template contents

At 10:42 AM 5/5/2008, Nelson Pereira wrote:

Content-Class: urn:content-classes:message
Content-Type: multipart/related; type=multipart/alternative;
boundary=_=_NextPart_001_01C8AED7.61321FB3

Hi,

Wondering how to do this:

When I resolve a ticket, I want RT to send the message I put in the 
resolve to the requestor, and not the default “as per our records….”



Nelson Pereira
Senior Network Administrator



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] WATCHERS

2008-05-01 Thread Gene LeDuc

Hi Andrew,

It can get confusing.

Queue watchers don't appear on tickets because they are not associated with 
the ticket, just the queue.  If they were added to the ticket, then they 
would stay with it when it moves to another queue (where they may not be 
watchers).  Watchers that are assigned to tickets stay with the ticket 
regardless where it ends up.


When a transaction generates an e-mail to watchers, it should go to all 
queue watchers for the queue that it's in plus any watchers assigned to 
that ticket.  There are exceptions (generally the person who creates a 
transaction doesn't get notified of it, even if she's a watcher, because 
she should already know about it), but mostly that's how it works.


You can't tell who the queue watchers are by looking at a ticket.

Regards,
Gene

At 05:40 AM 5/1/2008, andrew fay wrote:


I am trying to add watchers to queues so that if an email comes in to a
certain queue the watcher will be notified about it and copied in to each 
response etc.. I have added a watcher to a queue and but the ticket

has no watcher by default for some reason ?

I have set the user to have watch and watchasadmincc rights

also i have set the user to watch the queue as admincc and watcher and it 
still doesn't add it to the tickets,


any help would be great,

cheers

andy


--
Invite your Facebook friends to Messenger! Get Started!
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Error when changing $ParseNewMessageForTicketsCC

2008-04-23 Thread Gene LeDuc
Try quoting the regex: Set($RTAddressRegExp, '^(content\blah\blah...)$');


At 11:00 AM 4/23/2008, lgrella wrote:

I am trying to change the $ParseNewMessageForTicketsCC in the
RT_SiteConfig.pm.

  I tried this:

# For ticket 226, need to add the following lines for a cc to be added
# from an email created ticket. added by DOC 20080422
Set($ParseNewMessageForTicketCcs, 1);
Set($RTAddressRegexp,
^([EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL 
PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL 
PROTECTED]|[EMAIL PROTECTED])$);

and I tried this:

# For ticket 226, need to add the following lines for a cc to be added
# from an email created ticket. added by DOC 20080422
=[Set($ParseNewMessageForTicketCcs, 1);]
=[Set($RTAddressRegexp,
^([EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL 
PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL 
PROTECTED]|[EMAIL PROTECTED])$);]

For both of them the startup error was
 [Tue Apr 22 21:09:55 2008] [error] Can't load Perl file:
/usr/local/rt3/bin/webmux.pl for server tickets..com:0, exiting...

Webmux.pl existing in that path and looks fine (at least upon cursory
examination).

Any ideas?
--
View this message in context: 
http://www.nabble.com/Error-when-changing-%24ParseNewMessageForTicketsCC-tp16834733p16834733.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] turn off ticket creation via email

2008-04-22 Thread Gene LeDuc
Hi Chris,

I haven't tried this, but it seems to me that it ought to work.  If I 
wanted to do this on my installation (we use sendmail as our MTA), I'd 
remove the alias for that queue from sendmail's aliases file and then set 
the reply-to address for the queue to my generic RT address.  That way 
there won't be an e-mail address for the queue.  Replies to ticket-related 
mail will still get into RT and be filed with the ticket via the generic 
address.

Regards,
Gene

At 12:03 PM 4/22/2008, Chris Fabri wrote:
I have certain queues that I don't want users to be able to create new
tickets in via email.  I want to force them to use the web interface.
Is there a way to do this on a per queue basis?chris

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT not generating email for CCs/AdminCCs

2008-04-22 Thread Gene LeDuc
The first line of your Resolved template is a blank line, correct?

At 02:37 PM 4/22/2008, Thierry Thelliez wrote:
I am still stuck trying to have the CC field working (not the watcher): .

According to the log, my added scrip (On Resolve Notify Other
Recipients with template Resolved) is called but no emails are going
out for the CC field: 'No recipients found. Not sending.'.

On the other hand, the default scrip #9 (On Comment Notify Other
Recipients as Comment with template Correspondence) works for the CC
field (if some text is present in the Message box).

What am I missing?

Thierry
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] On Custom Field change scrip action

2008-04-18 Thread Gene LeDuc

Hi Ben,

I use this as a User Defined Custom Condition to detect a change in a CF 
named DMCA State:


{ ### True on state change to ITSO_Review
  my $Transaction = $self-TransactionObj;
  return $Transaction-Type  eq   'CustomField'
   $Transaction-Field eq   '3'
   get_custom('DMCA State') eq   'ITSO_Review'
  ;

  sub get_custom {
  ### Returns custom field value
  ### get_custom($field_name)
my $target_name = $_[0];
my $val = $self-TicketObj-FirstCustomFieldValue($target_name);
return $val
  if defined $val;
return undef;
  }
}

I wrote this quite a while ago; from what I've learned of RT since then, I 
suspect I could have used the CF's name DMCA State instead of it's ID 3 
like this:

   $Transaction-Field eq DMCA State

Of course, what you are detecting is going to be different, but you should 
be able to use this as a guide.


Disclaimer: I know this code could be reduced to 1 or 2 lines, but my 
coding philosophy is that readability trumps terseness.


Regards,
Gene

At 01:08 AM 4/18/2008, Ben Robson wrote:

Greetings,

I am not sure where to start with this one I'd like to have a check 
box custom field on tickets so that when the box is ticked an email is 
sent to a fixed email address notifying them that the box has been ticked.


Effectively:  OnUpdate - Check if CustomField checkbox has been 
selected(ticked) - If yes, send defined_template to fixed_email_address.


I have seen a few people doing something similar using the OnResolve 
condition, but we need to be able to flag a job before resolution, so need 
to use a custom field to set when the fixed_email recipient should be notified.


Does anyone have any good insight as to how to make this happen?

Thanks heaps for your assistance with this.

Best regards,
BenR


--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Requestor or Owner

2008-04-17 Thread Gene LeDuc
Hi John,

The Owner is usually the person who is taking responsibility for the ticket.

Gene

At 10:54 AM 4/17/2008, John  BORIS wrote:
This may be a simple question but is the Requestor (person who submits
the ticket) the same as the owner?  I usually enter tickets when Users
contact me or I am starting a project and want to track it in RT. But
now I want the user who contacted me to be the person who would have
emailed the request into RT or even filled out a form for the request.
So do I make that person the owner of the ticket or a watcher?


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Default Queue???

2008-04-14 Thread Gene LeDuc
Hi Tim,

I'm pretty sure it's just the first one alphabetically.

At 04:37 PM 4/11/2008, Tim Gustafson wrote:
Hello everyone!

Please forgive the potentially silly question, but I've Google this and
haven't been able to come up with anything.

Where the heck do you set the default queue for new tickets when users click
the New ticket in button at the top of the screen?


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] help with incoming scrip

2008-04-14 Thread Gene LeDuc
Hi Chris,

I'm not familiar with the extension, but a couple of observations might 
help (or not).

1.  With other templates, you would use $Transaction- instead of 
$self-TransactionObj-.  I don't know whether this is true for this 
extension.  The $self notation generally applies to scrips.

2.  It looks like you're setting the subject of the transaction rather than 
the ticket.  I'd try $Ticket-Set(Subject=$_) assuming that the Set 
syntax is correct.  Or $self-TicketObj-Set(Subject=$_) if I'm off-base 
with observation #1.

Just some place to start looking.

Regards,
Gene

At 02:06 PM 4/13/2008, Chris Haumesser wrote:
Ok, yes... ExtractCustomValues appears to be capable of doing what I want.

I'm unclear on what I can put in the script field of the template.
For example, here's what I've done...


1.  Created template in my queue containing the following:

||Body|^Title:\s*(.*)|$self-TransactionObj-Set( Subject = $_ )||


2.  Created scrip in my queue: on create, extract custom values, my new
template.


3.  Send test messages; subject does not change, nothing in syslog.


I have a feeling that the script field in my template isn't right.
What can I put in this field???

Appreciate any pointers in the right direction...



-C-


___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Sort attachments?

2008-04-09 Thread Gene LeDuc
On my 3.6.3 system, it appears that they do appear in reverse chronological 
order when the ticket is displayed.  Do yours just display in some random 
order?

At 06:31 PM 4/8/2008, lgrella wrote:
Is there any way to sort the attachments by date (or any other way) for a
ticket?

Thanks


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] [ERROR] Request-URI Too Large

2008-04-03 Thread Gene LeDuc
This looks like an RT design error.  For some reason it is passing a list 
containing every user's id via the URL.  If the list of users is long 
enough you will certainly break something.  Since you can't select which 
users to dump into the file (other than including disabled users), there's 
really no reason to have to pass the user list to the handler - it will 
always dump either all users or all users that aren't disabled.

Regards,
Gene

At 02:03 AM 4/3/2008, Ham MI-ID, Torsten Brumm wrote:
Hi RT Users,

Just tried to export my users (Configuration - Users - Download as TAB 
delimited File) and got this error:

Request-URI Too Large

The requested URL's length exceeds the capacity limit for this server.

Any idea how to fix this? Is this a error from RT (why the URL is so long) 
or can i change something at the webserver?

Thanks

Torsten

Kühne + Nagel (AG  Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann 
(Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred 
Manke, Christian Marnetté (Stellv.),  Mark Reinhardt (Stellv.), Jens 
Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, 
USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne  Nagel 
A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: 
Klaus-Michael Kühne


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Error in ConfigurationUsersDownload as a tab-delimited file

2008-04-03 Thread Gene LeDuc
RT v3.6.3

I was just looking through my apache error log and found a bunch of these 
when I tried downloading the users into a tab-delimited file:

[Thu Apr  3 15:58:13 2008] [err]: RT::User=HASH(0x23443f4) was created 
without a CurrentUser
1 (/opt/local/lib/RT/Base.pm:92)

These 2 lines were repeated for the number of users that were in the 
download.  In my case there were only 5 users, so these lines repeated 5 
times.  The hash value stayed the same.  When I did a second run I got 10 
more lines in the error log, but with another hash value.

Regards,
Gene


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] [ERROR] Request-URI Too Large

2008-04-03 Thread Gene LeDuc
Oops, now I see why the user list needs to be passed to the handler 
(results of a search may not contain _all_ users).

At 09:09 AM 4/3/2008, Gene  LeDuc wrote:
This looks like an RT design error.  For some reason it is passing a list
containing every user's id via the URL.  If the list of users is long
enough you will certainly break something.  Since you can't select which
users to dump into the file (other than including disabled users), there's
really no reason to have to pass the user list to the handler - it will
always dump either all users or all users that aren't disabled.

Regards,
Gene

At 02:03 AM 4/3/2008, Ham MI-ID, Torsten Brumm wrote:
 Hi RT Users,
 
 Just tried to export my users (Configuration - Users - Download as TAB
 delimited File) and got this error:
 
 Request-URI Too Large
 
 The requested URL's length exceeds the capacity limit for this server.
 
 Any idea how to fix this? Is this a error from RT (why the URL is so long)
 or can i change something at the webserver?
 
 Thanks
 
 Torsten
 
 Kühne + Nagel (AG  Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann
 (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred
 Manke, Christian Marnetté (Stellv.),  Mark Reinhardt (Stellv.), Jens
 Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928,
 USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne  Nagel
 A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat:
 Klaus-Michael Kühne


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] [ERROR] Request-URI Too Large

2008-04-03 Thread Gene LeDuc
Torsten, I can't see an easy workaround to do this via the web piece.  I 
posted a perl script a couple (or few) weeks ago that dumps a list of all 
users from the command line, so if you look through the archives for the 
last month or so for stuff posted by me you should find it.  As a 
disclaimer, the person I posted it for got an error and it didn't work.  It 
does work on my Solaris box and there aren't any funky calls in it that 
should break the script, so you might want to give it a try.


Good luck,
Gene

At 10:41 AM 4/3/2008, Ham MI-ID, Torsten Brumm wrote:


Hi gene,
What does this mean exactly? No chance to export all uiser? Now workaround 
(dump from the db?)


Torsten

-Original Message-
From: Gene  LeDuc [EMAIL PROTECTED]
To: Ham MI-ID, Torsten Brumm
CC: rt Users RT-Users@lists.bestpractical.com
Sent: Thu Apr 03 19:07:28 2008
Subject: Re: [rt-users] [ERROR] Request-URI Too Large

Oops, now I see why the user list needs to be passed to the handler
(results of a search may not contain _all_ users).

At 09:09 AM 4/3/2008, Gene  LeDuc wrote:
This looks like an RT design error.  For some reason it is passing a list
containing every user's id via the URL.  If the list of users is long
enough you will certainly break something.  Since you can't select which
users to dump into the file (other than including disabled users), there's
really no reason to have to pass the user list to the handler - it will
always dump either all users or all users that aren't disabled.

Regards,
Gene

At 02:03 AM 4/3/2008, Ham MI-ID, Torsten Brumm wrote:
 Hi RT Users,
 
 Just tried to export my users (Configuration - Users - Download as TAB
 delimited File) and got this error:
 
 Request-URI Too Large
 
 The requested URL's length exceeds the capacity limit for this server.
 
 Any idea how to fix this? Is this a error from RT (why the URL is so long)
 or can i change something at the webserver?
 
 Thanks
 
 Torsten
 
 Kühne + Nagel (AG  Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann
 (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred
 Manke, Christian Marnetté (Stellv.),  Mark Reinhardt (Stellv.), Jens
 Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928,
 USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne  Nagel
 A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat:
 Klaus-Michael Kühne


Kühne + Nagel (AG  Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann 
(Vors.), Uwe Bielang (Stellv.), Dirk Blesius (Stellv.), Bruno Mang, Alfred 
Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens 
Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, 
USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne  Nagel 
A.G., Sitz: Contern/Luxemburg, Geschäftsführender Verwaltungsrat: 
Klaus-Michael Kühne



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University ___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] adding custom filed value to email

2008-03-27 Thread Gene LeDuc
I cut my teeth on APL and used to spend hours shaving 7 or 8 bytes from the 
size of 360 assembly language programs, so I do have an appreciation for 
efficient and elegant coding solutions.

However...  several decades later and who-knows-how-many brain cells fewer, 
I've found that I spend less time looking up function names and fixing 
typos using code like:

   my $custom_field = get_custom(SomeField);

and

   set_custom(SomeField, $my_val);

### I've also developed a new appreciation for comment lines in my old age. :)

Gene

At 10:13 AM 3/27/2008, Huw Selley wrote:

On 27 Mar 2008, at 16:57, Stephen Turner wrote:
 
  Please don't Huw, this has been very entertaining ;)

:)

  How about just
 
  return $Ticket-FirstCustomFieldValue($_[0]);
 
 
  or even no subroutine - just use $Ticket-FirstCustomFieldValue($_[0])

If you want to ditch the sub $_[0] will always be undef as there will
be no @_ (because it's no longer a sub) :)
In that case (to use it as a one liner) just:

my $custom_field = $Ticket-FirstCustomFieldValue('SomeField');

Huw


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Automatically sending e-mails using RT

2008-03-27 Thread Gene LeDuc
Hi Jeff,

If you haven't disabled global scrip #2 (On Owner Change Notify Owner with 
template Transaction) then it should work out of the box.

If you've changed the template, the biggest gotcha is usually not leaving 
the first line of the template blank.  The blank line lets the mailer know 
where the headers end and the message body begins.  No blank line means no 
message body (and some pretty funky headers).

Regards,
Gene

At 11:46 AM 3/27/2008, Jeffrey J.D. Lee wrote:
I cannot seem to have the scrips in RT send an e-mail to the new owner I 
assign
a ticket to. It seems like it should be pretty straight forward but no
cigar. Any suggestions?

-Jeff



___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Assign custom field to subject

2008-03-26 Thread Gene LeDuc
Hi Laura,

I think your approach should work, but I don't think you can set the 
subject with a direct assignment like that.
Try $self-TicketObj-SetSubject($subject) instead.

Also, I don't think you should be replacing spaces with underscores in the 
CF name; leave the spaces.

Regards,
Gene

At 09:01 AM 3/26/2008, lgrella wrote:

I have a user who would like the subject to be a drop down list of choices. I
have not seen how to do this, so I have decided to create a custom field of
a drop down list of choices, and if the subject is blank, move this custom
field choice into the subject. I am not being successful. I have 2
questions:

1. Can I make the subject a drop down list for one queue,  rather than an
type in field?
2. If not, does anyone see anything wrong with my code:

here is the custom preparation code:
return 0 unless (!$self-TicketObj-Subject);
return 1;

and here is the custom cleanup code:
# move the contents of the custom field into the subject
# the name of my custom field is Choose subject here
my $subject =
$self-TicketObj-FirstCustomFieldValue('Choose_subject_here');

$self-TicketObj-Subject=$subject;
return 1;

###
Does the name of the field, since it has spaces, have to include
underscores? I did it that way, and for testing purposes, even chose a
custom field of one word to eliminate the question.

Thanks,
Laura


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Refresh rate on RT at a glance page

2008-03-24 Thread Gene LeDuc
Hi All,

Is there an easy (or not so easy) way to set the default refresh on the RT 
at a glance page from Don't refresh this page to some value like every 
20 minutes?  Can it be added to the personal preferences configuration so 
that it's an individual choice?  This is v3.6.3.

Thanks,
Gene



-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] User ID in a script?

2008-03-17 Thread Gene LeDuc
Hi John,

You can use this script as a starting point to loop through all your users:

#!/usr/bin/perl -w
### External libraries ###
use strict;
### Modify the next line to fit your installation
use lib (/opt/local/software/rt-3.6.3/lib);
package RT;
use RT::Interface::CLI qw(CleanEnv loc);
use RT::Users;
CleanEnv();
RT::LoadConfig();
RT::Init();
my $users = new RT::Users($RT::SystemUser);
$users-order_by(VALUE = 'Id');
 Loop through users 
while ( my $User = $users-Next ) {
   print sprintf(UserID: %s, RealName: %s\n,
 $User-Id(), $User-RealName());
}

Regards,
Gene

At 01:50 PM 3/17/2008, John Arends wrote:
I wrote a quick perl script that outputs a bunch of information about
all the users in my RT instance. I noticed that the ID numbers are all
over the place. One of my early users was created with an ID of 22, and
then the next user has an ID of 29, and then the next one is somewhere
in the mid 80s.

Does every object RT creates get a unique ID and when a user is created
it just gets the next one?

In my perl script, I want to loop through all the users so I can print
the infor for each one. Since this was a quick hack I just went through
the numbers 1 through 1000. Is there something built in that allows me
to do this in a more direct way? I don't want to loop until there is no
data since it seems like the ID numbes are all over the place.

#!/usr/bin/perl

use warnings;
use lib '/usr/lib/perl5/vendor_perl/5.8.5/RT';
use RT::Interface::CLI;
use RT::Ticket;
use RT::User;

RT::LoadConfig();
RT::Init();

for ($count=1; $count1000; $count++)
{
 my $user = RT::User-new( $RT::SystemUser );

 $user-Load( $count );

 if ( $user-Name){
 print $user-RealName .   . $user-Name .   . 
 $user-EmailAddress
.   . $user-id .   . $user-Privileged . \n;
 }
}

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] OnCreate NotifyAdminCcs

2008-03-14 Thread Gene LeDuc
Hi Mathew,

Since you already have a scrip that has conditions that determine whether 
or not to assign an owner when the ticket is created, I'd just copy those 
conditions into another scrip and negate them to determine whether to send 
the e-mail notification.  Timing in RT scrip execution can get tricky when 
one scrip is relying on another scrip having made a change.  Using the same 
conditions for your notification scrip doesn't rely on the owner having 
actually been changed yet.  Rather than using OnCreate, though, you need to 
use User-Defined for the condition.

Regards,
Gene

At 06:28 PM 3/13/2008, [EMAIL PROTECTED] wrote:
I was wondering if you could help me – I am trying to develop a Scrip 
custom condition that will prevent notification if a “Owner: owner” 
field has been emailed in ticket creation. We are using RT to generate 
tickets via email and in some cases we assign the owner on submission – 
the entire team that is ‘watching’ the queue does not need to receive 
email about tickets that already have an owner.

OnCreateNotifyAdminCc
Condition: OnCreate
Action: Notify AdminCcs
Template: Global template: Transaction
Stage: TransactionCreate

Custom condition:
my $transactionType = $self-TransactionObj-Type;
my $ticketOwner = $self-TicketObj-Owner;

if ($transactionType eq 'Create') {
 return 1 if ($ticketOwner()-Id() != $RT::Nobody()-Id());
}
return 0;

Ultimately we only want to continue executing the script if the owner is 
NOT Nobody.

Regards Mathew

Mathew Ericson
IT Specialist (Systems Design)
Agilent Technologies, Inc.
+613 9210-5956 Tel

-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Rights questions on ticket creation and assignment

2008-03-13 Thread Gene LeDuc
Hi Mike,

Sounds like you want (in 3.6.3 anyway, maybe also in 3.4.4) to assign 
rights to global roles.

   Configuration  Global  Group Rights

and then grant ReplyToTicket to the Requestor role.

Regards,
Gene

At 09:11 AM 3/13/2008, Mike Winn wrote:
RT 3.4.4

First question, which should be fairly simple:  Is there a way to allow
folks to reply to their tickets via email without allowing Everyone to
have 'Reply To Ticket' granted?   Ideally I would like for  a requestor,
owner, cc, admincc, or anyone who has emailed in on a ticket to be able
to reply to their own ticket, but not to everyone else's as is the case
with the 'Reply To Ticket' granted to 'Everyone.'  In reading through
documentation, it seems as though this is the only way to make email
replies work in that manner?  I am not particularly interested in
allowing folks from other email addresses to reply to a ticket where
they were not already getting email as either the owner, requestor, cc,
or admincc.
snip
-Mike


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Autoreply stopped working

2008-03-10 Thread Gene LeDuc
Just in case you might have also cleaned up the template, make sure its 
first line is blank.

Turn on debugging in your logs and stick logger commands into various parts 
of the scrip so you can see what is going on.

At 04:05 AM 3/10/2008, Mathew wrote:
We have recently encountered a situation where auto replies have stopped
going out for all queues.  The only recent changes have been to the
global scrip which sends them.

It had been pointed out that when people are listed as Ccs on a ticket
they don't get the content of an email.  I had modified the scrip to
include those people but decided they didn't need the auto reply and
only needed the content of the email.  I made another scrip to cover
this instead.  After creating the second scrip I set the first one back
to On Create Notify Requestors with Global Template: Autoreply.  Since
then, nothing goes out.

I've verified that it isn't set to Disabled and that the Stage is
TransactionCreate.

Anyone else ever experience this and know what to do about it?

Mathew
--
Keep up with me and what I'm up to: http://theillien.blogspot.com
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] BCC with no subject creates ticket

2008-03-07 Thread Gene LeDuc
I wanted to something similar, sorta, kinda..  Anyway, I wanted to prevent 
ticket creation by a new email under certain conditions.  I never could 
figure out how to do it within RT because you don't control until after the 
ticket's been created.  So I ended up just deleting the ticket right after 
it was created.

At 02:27 PM 3/7/2008, Mark Sallee wrote:
Our customer wants to be able to send BCC'd messages from their e-mail
client into RT, but if the message doesn't have a proper RT subject
syntax, they don't want it to autocreate a new ticket. Preferrably a
scrip could reject the message and respond with something like you
forgot to enter an RT subject; message denied.

This is RT version 3.6.3. Right now help-comment is aliased in postfix
/etc/aliases. I've tried procmail, but it apparently doesn't like
filtering Bcc's and the message never gets through to RT.

Has anyone found a solution for this, scrip or otherwise?

Thank you.

--
Mark Sallee, Systems Administrator
The GLOBE Program - UCAR
[EMAIL PROTECTED]


___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] history of tickets?

2008-03-06 Thread Gene LeDuc
Hi Kevin,

Thanks for doing the legwork on this!  Does overriding these files work 
the same as creating a local copy of a .pm file (ShowRequestor_Local) or is 
there some other way to do it without modifying the original file?  It 
seems to me that I tried this some time ago with another file and it didn't 
work.

Thanks,
Gene

At 08:54 AM 3/5/2008, Kevin Falcone wrote:

On Mar 5, 2008, at 11:30 AM, Greg Evans wrote:

  Any ideas on how to make this behave the way that I would like it
  to? Even
  pointing me to a path/to/filename maybe?

You can change this by overriding
html/Ticket/Elements/ShowRequestor

The FromSQL call controls the Status

-kevin

 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] history of tickets?

2008-03-04 Thread Gene LeDuc
This doesn't show resolved or rejected tickets, at least in 3.6.3.

At 12:32 PM 3/4/2008, Ruslan Zakirov wrote:
If requestor is unprivileged then there is a box More about  on
ticket's page. Have you seen it?

On Tue, Mar 4, 2008 at 11:25 PM, Greg Evans [EMAIL PROTECTED] wrote:
  Hello list,
 
   Is there a way to show a link for every ticket that has ever been created
   for a given user?  What I am looking to do is add a history of all tickets
   to the People section.
 
   I have already added some things, but was not sure how I would go about
   adding this, or maybe there is a better way that I have not discovered 
 yet?
 
 
   I was hoping for something like:
 
   Call History:
   Ticket #   Subject  Status
   12345  Email Issue  Resolved
   13421  Connection Issue Resolved
   14597  Wireless Issue   Stalled
 
   The above would also be links to each ticket.
 
   Greg Evans
   Hood Canal Communications
   (360) 898-2481 ext.212
 
 
   ___
   http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
   Community help: http://wiki.bestpractical.com
   Commercial support: [EMAIL PROTECTED]
 
 
   Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
   Buy a copy at http://rtbook.bestpractical.com
 



--
Best regards, Ruslan.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] AdminCC not working

2008-02-25 Thread Gene LeDuc
Hi Matt,

I don't think the Queue AdminCcs show up within tickets.  They don't on my 
system, but they do get the mail that they are supposed to get.  I'm pretty 
sure that the people entries would only show watchers that have been 
added to the ticket via a script or the ticket's People tab.

Regards,
Gene

At 10:24 AM 2/25/2008, Matt Westfall wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I've got a pretty weird problem going on here.

I have the group Admins set as the AdminCC watcher for all my queues.

When I create a ticket the members of the group get the AdminCC ticket
created template, but they are not added as AdminCCs under People so
they don't get future updates.

Any ideas?

RT 3.6.6

Set( $rtname, 'rt.ecansol.com');


Set($Organization , rt.ecansol.com);


Set($OwnerEmail , '[EMAIL PROTECTED]');

Set($CorrespondAddress , '[EMAIL PROTECTED]');

Set($CommentAddress , '[EMAIL PROTECTED]');

Set($WebPort , 443);# + ($ * 7274) % 32766 + ($  1024));

# This is the Scheme, server and port for constructing urls to webrt
# $WebBaseURL doesn't need a trailing /

Set($WebBaseURL , https://rt.ecansol.com:$WebPort;);

Set($WebURL , $WebBaseURL . $WebPath . /);

Set($OldestTransactionsFirst, '0');

#Set($SendmailArguments , -ODeliveryMode=q -oi -t);


1;

- --
Matt Westfall
Owner / Operator
FiftyPounds Internet
http://www.fiftypounds.com

This message is digitally signed with Pretty Good Privacy (PGP)
Info: http://en.wikipedia.org/wiki/Pretty_Good_Privacy

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHwwfvb/8X6V5MpAURAobQAJ4n7SIcdMPTTu6WHumqCgNwvmm1XwCgzusv
m8ZPVwycEINyKlhYiZgyYkc=
=tgIu
-END PGP SIGNATURE-
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Shredder bug? (was: Shredder web gui, bad path to tickets)

2008-02-19 Thread Gene LeDuc
I found the problem with displaying objects returned by the Shredder search 
and I think it might be a bug.  The files in
   rtroot/share/html/Admin/Tools/Shredder/Elements/Object
return a path using $RT::WebBaseURL instead of $RT::WebURL; this leaves off 
$RT::WebPath.  So on my system, links point to 
https://mysystem:443/Ticket/Display.html?id=498
instead of https://mysystem/rt/Ticket/Display.html?id=498

The files I had to modify are
   RT--Attachment
   RT--Ticket
   RT--User

Disclaimer:
Since Shredder has been around awhile and no one else has reported this, 
it's possible that this could be due to settings in my RT_Siteconfig that I 
made to get RT to work using https, but it was a while ago and I don't 
recall how I changed the settings from their default.

Regards,
Gene

At 11:56 AM 2/18/2008, I wrote:
I've just installed the latest Shredder extension via CPAN and it seems to
do its job nicely wiping out deleted tickets via the web gui.  When I click
on a ticket from the search results, though, the path to the ticket is
missing the root rt/ component.  Everything else has been working fine
for a year or more.

The path should be: https://rt.company.com/rt/Ticket/Display.html?id=7
But this is what Shredder search is showing (which returns a 404
error):  https://rt.company.com/Ticket/Display.html?id=7

Is this something that needs to be set in RT_Siteconfig or do I need to
modify the shredder html?

My RT is installed in a non-standard location, but I gave the installer the
path to my RT.pm and everything seemed to install fine.


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] change subject string

2008-02-15 Thread Gene LeDuc
Hi Robert,

The [box] verbiage on the subject line (and the box itself) are set in the 
SetSubjectToken subroutine in SendEmail.pm.  We modified it on our setup so 
we could remove the box entirely for certain outgoing messages.

Regards,
Gene

At 11:44 AM 2/15/2008, Robert Keidel wrote:
I am using RT 3.6.4, I setup the whole application, and everything
works perfect. My manager wants me to make some changes in the system
and I was able to do so for most of it. Now I am stuck on the point
that I don't know where I can change/add something to the subject
string.

right now the string looks like this:

[$rtname #375] Request for a PC repair

I would like to change it to

[$rtname Ticket/Case #375] Request for a PC repair

Where can I change that, or how?


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Timezone problem RT-3.6.6

2008-02-14 Thread Gene LeDuc
Hi Stephen,

I think the bug was in 3.6.1.  You probably compensated for it somehow and 
now it's working the way it should.  The reason I'm suggesting this is that 
when I first installed RT it was 3.6.1, and there was a timezone 
discrepancy with the time that was being applied to outgoing e-mails.  The 
developers suggested I upgrade to 3.6.3 and the problem went away.  I'd 
take a good look at the time and timezone settings on your server and then 
check to make sure that the settings in your RT config make sense in that 
context.

Regards,
Gene

At 08:39 PM 2/13/2008, Stephen Carr wrote:
Dear All

There seems to be a bug regarding the Timezone - it is bugging a user that
uses Eudora email client in that RT emails are 10:30 hours in the future
(at present Australia/Adelaide is +1030) - other email clients seem OK.


Below is a header of the email sent - not the line ###XXX### near bottom

I think that RT use GMT in the database to manage requests from different
timezones.

Any ideas / fix?

It recently upgraded from 3.6.1 to 3.6.6 and had no complaints with 3.6.1

Thanks
Stephen Carr


Return-Path: [EMAIL PROTECTED]
Received: from localhost ([unix socket])
  by brooks.civeng.adelaide.edu.au (Cyrus v2.3.8) with LMTPA;
  Thu, 14 Feb 2008 12:01:16 +1030  ##
X-Sieve: CMU Sieve 2.3
Received: from brooks.civeng.adelaide.edu.au (localhost [127.0.0.1])
 by brooks.civeng.adelaide.edu.au (8.14.2/8.14.2) with ESMTP id
m1E1VFk4021481
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
 for [EMAIL PROTECTED]; Thu, 14 Feb 2008 12:01:15 +1030
###
Received: (from [EMAIL PROTECTED])
 by brooks.civeng.adelaide.edu.au (8.14.2/8.14.1/Submit) id
m1E1VFhN021478;
 Thu, 14 Feb 2008 12:01:15 +1030 #
Subject: [rt #1148] AutoReply: Lifedrive Sync with Oracle Calendar and
Palm Desktop ARS
From: RT Civeng [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
In-Reply-To:
References: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
Precedence: bulk
X-RT-Loop-Prevention: rt
RT-Ticket: rt #1148
Managed-by: RT 3.6.6 (http://www.bestpractical.com/rt/)
RT-Originator: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=utf-8
X-RT-Original-Encoding: utf-8
Date: Thu, 14 Feb 2008 12:01:15 +101800   ######
X-Scanned-By: MIMEDefang 2.63 on 129.127.16.1
X-DSPAM-Result: Whitelisted
X-DSPAM-Processed: Thu Feb 14 12:01:16 2008 
X-DSPAM-Confidence: 0.9993
X-DSPAM-Probability: 0.
X-DSPAM-Signature: 47b399e4214865649514390





--
Stephen Carr
Computing Officer
School of Civil and Environmental Engineering
The University of Adelaide
Tel +618-8303-4313
Fax +618-8303-4359
Email [EMAIL PROTECTED]

CRICOS Provider Number 00123M
---
This email message is intended only for the addressee(s)and contains
information that may be confidential and/or copyright.  If you are not the
intended recipient please notify the sender by reply email and immediately
delete this email. Use, disclosure or reproduction of this email by anyone
other than the intended recipient(s) is strictly prohibited. No
representation is made that this email or any attachments are free of
viruses. Virus scanning is recommended and is the responsibility of the
recipient.

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Hours Worked

2008-02-08 Thread Gene LeDuc
I wrote a mod to the Business::Hours package that lets you subtract one 
date from another.  It's on the wiki as part of something else I posted, 
but since I don't remember where I'll post it below.  It works just like 
the add_seconds() method, but it subtracts instead.  You can either append 
it to the end of your program or (I think) put it into your RT config file.

## start of code
### Need to add this to Business::Hours so I can count backwards from due date
{ package Business::Hours;
   sub sub_seconds {
   ### This method is hacked version of add_seconds(), written by Gene 
LeDuc
   my $self = shift;
   my $start = shift;
   my $seconds = shift;

   # the maximum time after which we stop searching for business hours
   my $MAXTIME = (30 * 24 * 60 * 60); # 30 days
   my $first;
   my $period = (24 * 60 * 60);
   my $begin = $start - $period;
   my $hours = new Set::IntSpan;
   while ($hours-empty or $self-between($hours-first, $start) = 
$seconds) {
 if ($begin = $start - $MAXTIME) {
   return -1;
 if ($begin = $start - $MAXTIME) {
   return -1;
 }
 $hours = $self-for_timespan(Start = $begin, End = $start);
 $begin -= $period;
   }
   my @elements = reverse elements $hours;
   $first = $elements[$seconds];
   return $first;
   }
1; #this line is important and will help the module return a true value
}
## end of code

Regards,
Gene

At 10:37 PM 2/7/2008, Chaitanya Veludandi wrote:
Hi,

Is there a way to calculate Hours Worked (using Business Hours) based on 
the difference betwee Resolved Time and Created Time and then move it to a 
custom Field?

Regards,

Chaitanya
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Create a prep action based on custom header

2008-02-06 Thread Gene LeDuc
Hi Kevin,

Answers: 1) logic is good but; 2) syntax is not

The my $submitted line is going to return a true or false depending on 
whether the header is there and has yes as it's argument.  Since it's a 
true/false value, you can use
   if ( $submitted )
instead of what you have.

And in fact, since you already have a boolean value, you could replace your 
entire if block (6 lines after the comment) with:
   return $submitted;

If your X-Webform header exists and has yes as it's value, the prep code 
will return TRUE and let the cleanup code execute, otherwise it will return 
FALSE and that will be the end of it.

Regards,
Gene


At 08:12 AM 2/6/2008, Kevin Squire wrote:
I have a webform that submits an email into RT.  I have a scrip that I 
want to run ONLY if the email came from the webform.  I currently have the 
scrip set up, and all is working - but it works on EVERY email that comes 
in.  I would like to add a check so that if the email came from somewhere 
other then the web form, then the rest scrip can be by-passed.  With my 
webform, I have added an X-header -- X-Webform: yes

 From reviewing the archives, It appears as though I can place this check 
 into the prep code.  From what I found on the list, I have put the 
 following prep code together.  But since my Perl skills are zero to null 
 I wanted to run it by the list:

Prep Code:

my $Trans = $self-TransactionObj;
my $submitted = $Trans-Attachments-First-GetHeader('X-Webform') =~ 
 /^yes\b/ ;
# if the X-webform is yes then do magic
if ( $submitted = yes )
  {
return 1;
  } else {
   return 0;
  }


So, for the scrip edit page I currently have this:
Condition: On Create
Action: User Defined
Template: Global template:Blank
Stage: TransactionCreate

Custom condition: BLANK
Custom action prep. code: currently it has return 1; but I would 
 like to add the check
Custom action cleanup code:  My Magic

So my questions are:
1) Is my logic right - by adding a return 1 if or return 0 type 
statement to the prep condition will I by-pass the cleanup code?
2) Is my prep code noted above good or is my lack of Perl showing through?


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


  1   2   3   >