[rt-users] Remove extraneous records from DB

2013-06-03 Thread Don Smitheimer
All,

While trying to debug a custom action scrip module I developed, I made a change 
to the ScripAction array and re-ran rt-setup-database which inserted another 
record into the DB for the same module, with the same name.

Obviously now there are two entries with the same name for the action scrip in 
the web pull down for Action.

Is there an easy way to delete one of the records?  I searched the list and 
wiki without success, but I may not have entered the right search terms.

Thanks much,

Don


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

[rt-users] Modify email and ticket subject for tickets created from email

2013-05-10 Thread Don Smitheimer
Hi All,

I managed to get this working pretty well, but I would like to know if there's 
a smarter way to implement it.

I have RT4.

Here's the overview:
We have attempted to adopt a standard email subject format of the form: 
Env|Sev|Msg|Tickets, where Env is environment and can be Prod, SIT, etc.; Sev 
stands for Severity and can be of the form Sev-1, Sev-2, etc; Msg is the actual 
subject, and Tickets is a comma-separated string of tickets where the RT ticket 
will be the first.

The plan was to send an email to RT with the first 3 fields completed, RT will 
create the ticket and append the ticket number tag to the subject, such that 
subsequent emails will be captured by RT in the ticket.

It works on my RT sandbox.  I created a scrip and template to change the ticket 
subject and email subject.  The perl code does more than just append the tag.  
I have logic to check for abbreviations for the different environments (such as 
using prd vs PROD), and using sev1 rather than Sev-1, etc.

Since the logic to change the subject for both the email and the ticket is 
basically the same, I need to maintain essentially the same code in both places.

My question: is there a smarter or better way to make this work?

Please note: I want to expand the requirement to change a ticket's custom 
fields based on subject contents. For example, if the subject has PROD, I want 
to automatically set the environment custom field to PROD.

Thanks much,
Don



-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training