[rt-users] RTIR 2.6.1: Can't list any most due incidents after upgrade.

2012-05-18 Thread Robson Eisinger
Hi guys,

That's my first time writing to this list and I didn't find any info related
to my problem. As English isn't my first language, I hope to be clear enough
with my text and that I can find some help here. =)

Okay, here my problem. We have a RT 3.8.2 installed on a physical machine
(OS: FreeBSD; Plugins: RTFM and RTIR 2.4.2) and right now this machine is
dying, so we decided to create a dedicated VM to host a new RT installation.
For some reason, we decided to change the OS to Ubuntu 12.04 LTS,  and
considering all the dependences, we installed a fresh install with RT
3.8.11, RTFM 2.4.3 and RTIR 2.6.1. After that, we restored a mysql dump from
our old RT, and following the procedures from all the UPGRADING guides (RT,
RTFM, RTIR), we finished our installation. Everything went well, but in the
RTIR part, we can't list any most due incidents, the list is blank. Anyone
can give me some light about that?

I don't know if I'm being clear enough, I can answer any question related,
but I can't give any Screenshot or show any data. 

Cheers,

Robson Eisinger
Network Analyst at University of Sao Paulo/Brazil



[rt-users] SLA and holidays

2012-05-18 Thread Robert Wysocki
Hi there,

I would like to combine SLA extension with Date::Holidays module.
Any ideas, how to do that besides patching?

Regards,
-- 
Robert Wysocki
administrator systemów linuksowych
CONTIUM S.A., http://www.contium.pl




[rt-users] Require owner before update

2012-05-18 Thread Mayk Backus

Hi List,

I'm searching the list but can't find anything usefull for now. At our 
site, a lot of agents lack becoming owner of tickets.  I want them to 
take a ticket first and then start working on it. Is there a way to 
force this that the must be an owner set ?


thanks in advance.

Regards,

Mayk



Re: [rt-users] SLA and holidays

2012-05-18 Thread Ruslan Zakirov
On Fri, May 18, 2012 at 3:06 PM, Robert Wysocki
robert.wyso...@contium.pl wrote:
 Hi there,

 I would like to combine SLA extension with Date::Holidays module.
 Any ideas, how to do that besides patching?

Actually newer versions of Business::Hours module that is used by SLA
extension has a way to setup holidays. It's a little bit limited as
you can not do short business days next to holidays or move working
days to weekends.

 Regards,
 --
 Robert Wysocki
 administrator systemów linuksowych
 CONTIUM S.A., http://www.contium.pl


-- 
Best regards, Ruslan.


Re: [rt-users] SLA and holidays

2012-05-18 Thread Robert Wysocki
Dnia 2012-05-18, pią o godzinie 15:52 +0400, Ruslan Zakirov pisze:
 On Fri, May 18, 2012 at 3:06 PM, Robert Wysocki
 robert.wyso...@contium.pl wrote:
  Hi there,
 
  I would like to combine SLA extension with Date::Holidays module.
  Any ideas, how to do that besides patching?
 
 Actually newer versions of Business::Hours module that is used by SLA
 extension has a way to setup holidays. It's a little bit limited as
 you can not do short business days next to holidays or move working
 days to weekends.

Thanks, I'll look into it.

Best regards,
-- 
Robert Wysocki
administrator systemów linuksowych
CONTIUM S.A., http://www.contium.pl




Re: [rt-users] Show a Queue's description instead of its name...

2012-05-18 Thread Ruslan Zakirov
On Thu, May 17, 2012 at 11:55 PM, April Rosenberg apr...@yelp.com wrote:
 PS.  Sorry if this is a duplicate, I didn’t get the message through the list
 so I was concerned I hadn’t sent it correctly.

It is and I replied to older mail. Keep this thread silent.

-- 
Best regards, Ruslan.


[rt-users] Content field missing from Articles

2012-05-18 Thread Cena, Stephen (ext. 300)
I'd like to start using Articles here at work, but something isn't
working correctly. I've got a Class set up and a Topic, but when I go to
create an Article the Content field is completely missing. I can
edit/modify all the other fields except the most important one. What
could be causing this?
 
Stephen Cena
MIS/IT Dept - Quality Vision International
850 Hudson Ave
Rochester,NY. 14621
Ph: 585-544-0450 x300
Thank you for helping us help you help us all.
 


Re: [rt-users] Require owner before update

2012-05-18 Thread Thomas Sibley
On 05/18/2012 07:49 AM, Mayk Backus wrote:
 I'm searching the list but can't find anything usefull for now. At our
 site, a lot of agents lack becoming owner of tickets.  I want them to
 take a ticket first and then start working on it. Is there a way to
 force this that the must be an owner set ?

Remove the rights granted globally or on a queue/group level and only
grant ticket modification rights to the Owner role.  Make sure they have
TakeTicket even when they're not the Owner.

With this setup correctly, if they're not the Owner, they won't have the
modification rights.  If they are the Owner, they'll pick up the
modification rights.

Thomas


Re: [rt-users] Content field missing from Articles

2012-05-18 Thread Thomas Sibley
On 05/18/2012 08:19 AM, Cena, Stephen (ext. 300) wrote:
 I'd like to start using Articles here at work, but something isn't
 working correctly. I've got a Class set up and a Topic, but when I go to
 create an Article the Content field is completely missing. I can
 edit/modify all the other fields except the most important one. What
 could be causing this?

Read `perldoc docs/customizing/articles_introduction.pod`, or view the
latest version on the web at
https://github.com/bestpractical/rt/blob/stable/docs/customizing/articles_introduction.pod


Re: [rt-users] Reply/Comments to include previous message attachments.

2012-05-18 Thread Luong Bui Duc
Can i please get a reply for this thread? thanks a lot

Luong

On Thu, May 10, 2012 at 12:12 PM, Luong Bui Duc luong.d@gmail.comwrote:

 Hi,

 I have RT 4.0.4 and currently users requested to have previous
 email(original email) attachments to be added to correspondence/reply so
 they don't have  to manually download each attachment and attach in
 correspondence. I'm pretty sure this feature is implemented, but just can't
 find it. Could you please help me out here. Thanks a lot

 --
 Regards,

 Bui Duc Luong




-- 
Regards,

Bui Duc Luong


Re: [rt-users] Require owner before update

2012-05-18 Thread Bill Cole

On 18 May 2012, at 7:49, Mayk Backus wrote:


Hi List,

I'm searching the list but can't find anything usefull for now. At our 
site, a lot of agents lack becoming owner of tickets.  I want them to 
take a ticket first and then start working on it. Is there a way to 
force this that the must be an owner set ?


One way to enforce this operationally without getting agents to change 
work habits is a Scrip that assigns ownership to a user who updates a 
ticket owned by Nobody. Using Scrips to automate work rules rather 
than Rights settings allows for more complex and nuanced rules, 
particularly ones that you might want agents to be able to reverse by a 
conscious choice. For example, the RT instance I wrangle has a Scrip 
that runs when a ticket is resolved that gives ownership of Nobody 
tickets to the person who is resolving the ticket. This has the useful 
side-effect of making sure Requestors don't get notification of 
resolution without a specific responsible human identified. Agents can 
still specifically go back and disown a ticket they've been given by 
that Scrip, but that would be a distinct transaction they have to do 
intentionally.


On the other hand, fine-tuning Rights provides agents with UI clues 
about the proper workflow, provided they have been trained well.


Re: [rt-users] Reply/Comments to include previous message attachments.

2012-05-18 Thread Ram
Last month an answer to your question showed up on this list:

 Being able to reply to a ticket including arbitrary attachments from
 other transactions on the ticket is a feature we've been playing with for
 4.2, but we don't know if it'll make the cute.

 -kevin





On Fri, May 18, 2012 at 8:24 AM, Luong Bui Duc luong.d@gmail.com wrote:
 Can i please get a reply for this thread? thanks a lot

 Luong

 On Thu, May 10, 2012 at 12:12 PM, Luong Bui Duc luong.d@gmail.com
 wrote:

 Hi,

 I have RT 4.0.4 and currently users requested to have previous
 email(original email) attachments to be added to correspondence/reply so
 they don't have  to manually download each attachment and attach in
 correspondence. I'm pretty sure this feature is implemented, but just can't
 find it. Could you please help me out here. Thanks a lot

 --
 Regards,

 Bui Duc Luong




 --
 Regards,

 Bui Duc Luong



[rt-users] How do I override a default scrip?

2012-05-18 Thread Paul Tomblin
How can I override a default scrip for a queue?  If I define a new
scrip with the same name as an existing one, it runs both of them.


-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin


Re: [rt-users] RT4.0.5 article creation- classes and topic nesting

2012-05-18 Thread Albertson, William (Rancho Cordova)
Really, if someone could reply to this, even to inform me that I should fill 
out a feature request, that would be helpful.  To restate, with goofy diagrams, 
what I was expecting:

Article Class:  PJM
Article Class:  QA
Article Class:  Ops (group perms set here)
|---Topic: Systems
|---Sub-Topic: Monitoring Services
|   |---Article: Introduction (Textbox)
|   |---Article: How to request (Textbox, 
linktoform)
|---Sub-Topic: Hosts
|---Sub-Topic: BKP01
|---Article: HostManifest 
(Textbox, IP, and stat fields)
|---Article: HostWarranty 
(contacts, s/n and date fields)
|---Article: HostServices 
(Various svc fields, SLA links)

How it works so far, where it appears [toplevel Topic] = [Class] = [sole 
Article Format]:
Article Class:  PJM
Article Class:  QA
Article Class:  Ops (group perms set here, and article format limited to one 
type per CLASS)
|---Topic: Systems
|---Sub-Topic: Monitoring Services
|   |---Article: Introduction (Textbox)
|   |---Article: How to request (Textbox)
|---Sub-Topic: Hosts
|---Sub-Topic: BKP01
|---Article: HostManifest 
(Textbox)
|---Article: HostWarranty 
(Textbox)
|---Article: HostServices 
(Textbox)

I hope this makes my dilemma a bit clearer.  If we want multiple formats, then 
we need multiple toplevel Topics?

I expected to differentiate formats of articles under sub-topics.  If my 
expectations were out of line, then I'd appreciate a reply from someone about 
how it is intended to be done, as the documentation on 4.0.5 article creation 
doesn't really go into this.

My other option would be to fill up the Article Topic toplevel with all of the 
different article formats I (and others) would wish to use, but then we lose 
the ability for viewers to browse except by article format (and I wouldn't see 
the point of topic trees).  

Most of this article creation is intended to be self-service for multiple 
groups, so I would like to keep it as simple as possible, allowing users within 
their groups to create and format articles specific to sub-topic.


William Bill Albertson

-Original Message-
From: Albertson, William (Rancho Cordova) 
Sent: Wednesday, May 16, 2012 4:31 PM
To: 'rt-users@lists.bestpractical.com'
Subject: RT4.0.5 article creation- classes and topic nesting

Howdy,

I haven't found a lot of information about creating articles under RT4.0.5 with 
nested topics.  I've recently installed this application, so I'm also not an 
expert.  I'm not sure if I would be better served by instead setting up a wiki, 
and then just linking article items instead.  Here is the problem:

I've created the class Ops for articles.  This is the name of our group of 
staff.  We are setting permissions for editing Ops related articles here.  
Also, there are other groups to be considered- this installation isn't just for 
Ops.  There will be other teams with their own articles. 

Next, I created a tree of topics.  Let's say Systems and Networks.

Subtopics under Systems are Hosts, and then other overview topics like 
Backups.

Under Hosts are going to be articles containing host specific info, like a 
manifest article for backupsrv01, and another article for warranty information.

Then I get into article creation.  I created a couple of custom fields called 
Body [wikitext] IP Address [ip address] and Attachment [one upload].

The problem I run into is that RT doesn't seem to differentiate between 
different topic custom fields within a class's sub-topics.  I need to display 
IP address information for hosts articles, but don't need to see that field 
for an explanation on our backup system.  Am I putting the cart before the 
horse for managing different article formats?

It seems that the Articles feature of RT is limited to exactly one type of 
article format per class, regardless of how many sub-topics you have underneath 
that class.  From my testing, I would have to create a class for every single 
article format type that I wish to use (host manifest, host warranty, service 
overview would now all be classes), which wouldn't work well with having nested 
topics underneath.  Then, my users would have to search for general keywords, 
because now they would not be able to drill down nested topics easily for topic 
specific information.  Instead of drilling down through Ops - Systems - 
Hosts - 

Re: [rt-users] How do I override a default scrip?

2012-05-18 Thread Bill Cole

On 18 May 2012, at 14:45, Paul Tomblin wrote:


How can I override a default scrip for a queue?


You don't. A Scrip is either Global or limited to a single Queue, and is 
either enabled or disabled in that scope. If you have a Scrip that you 
want to apply to all Queues except for one, you need to disable the 
Global version and replicate it in all Queues except for one.


Another option is to modify the Global Scrip with a User Defined 
Condition that returns 0 if the Queue is one that you want to exempt.



If I define a new
scrip with the same name as an existing one, it runs both of them.


Yes, it does. Scrips are objects that point to Queues by ID, Queues are 
not objects that point to Scrips by name.


[rt-users] how to prevent duplicate emails

2012-05-18 Thread Sandra Wittenbrock
Hello,

When I resolve a ticket, I want the requester to receive the ticket
comments, and a notice the ticket is resolved, in just one email.
Someone out there must have this set up.  I've been playing with
TransactionBatch to see if that could help prevent duplicates.

Currently, I use a default resolve scrip, which notifies the requester
when the ticket is resolved.  The template does not include the comments
from the resolution, only some generic text.

I've been going in circles trying to have the requester get only one
ticket upon resolution.  An email which includes the resolution comments.

If when I resolve the ticket, I change the Update Type to Reply to
Requestors, the requester gets one email, without the comments.

Here is the summary of my scrips.

 
   #   Description Stage   Condition   Action  Template
   14  Notify Requestor on Correspond  TransactionCreate   On 
 Correspond   Notify Requestors   Admin Correspondence
   13  Notify requestor when ticket is taken   DisabledOn 
 Owner Change Notify Requestors   Owner Changed
   8   On Comment Notify AdminCcs as Comment   TransactionBatch
 On Comment  Notify AdminCcs as Comment  Admin Comment
   9   On Comment Notify Other Recipients as Comment   Disabled
 On Comment  Notify Other Recipients as Comment  Correspondence
   5   On Correspond Notify AdminCcs   TransactionBatchOn 
 Correspond   Notify AdminCcs Admin Correspondence
   6   On Correspond Notify CcsTransactionBatchOn 
 Correspond   Notify Ccs  Correspondence
   7   On Correspond Notify Other Recipients   DisabledOn 
 Correspond   Notify Other Recipients Correspondence
   17  On Correspond Notify Requestor  TransactionBatchOn 
 Correspond   Notify Owner, Requestors, Ccs and AdminCcs  Admin 
 Correspondence
   1   On Correspond Open Tickets  TransactionCreate   On 
 Correspond   Open TicketsBlank
   3   On Create Autoreply To Requestors   TransactionCreate   
 On Create   Autoreply To Requestors Autoreply
   4   On Create Notify AdminCcs   TransactionCreate   On 
 Create   Notify AdminCcs Transaction
   15  On Owner Change Notify Admincc  TransactionCreate   On 
 Owner Change Notify AdminCcs as Comment  Owner Changed
   2   On Owner Change Notify OwnerDisabledOn Owner Change 
 Notify OwnerOwner Changed
   18  On Owner Change Notify RequestorTransactionBatch
 On Owner Change Notify Requestors   Owner Changed
   10  On Resolve Notify RequestorsTransactionBatchOn 
 Resolve  Notify Owner, Requestors, Ccs and AdminCcs  Resolved
   11  On transaction, add any tags in the transaction's subject to 
 the ticket's subject   TransactionCreate   On Transaction  Extract 
 Subject Tag Blank
 (Check box to delete)
 


I've looked at the mysql settings/tables.  I've looked at the logs, and
am trying to see where in the code it is asking to send all these
emails.  There is a section where it prevents sending emails to
blacklisted addresses.  It would be nice if it prevented duplicates.  I
haven't used perl in a while, so haven't been able to modify.

Sandra


Re: [rt-users] How do I override a default scrip?

2012-05-18 Thread Paul Tomblin
On Fri, May 18, 2012 at 3:47 PM, Bill Cole
rtusers-20090...@billmail.scconsult.com wrote:
 Another option is to modify the Global Scrip with a User Defined Condition
 that returns 0 if the Queue is one that you want to exempt.

How do I programmatically add one of these User Defined Conditions to
an existing RT Global Scrip?  (Preferably something that I can do in
my etc/initialdata)




 If I define a new
 scrip with the same name as an existing one, it runs both of them.


 Yes, it does. Scrips are objects that point to Queues by ID, Queues are not
 objects that point to Scrips by name.

I'd just like to point out that's completely inconsistent with the way
Templates are done.


-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin


Re: [rt-users] how to prevent duplicate emails

2012-05-18 Thread Joe Harris
We are in the same boat. I have a plan to change all of the scrips on 
reply/comment/resolve to use a default transaction template that gives all info 
to all users (admincc, requestor, etc) just once on each transaction. In our 
case we use rt internally so we don't have the need to comment without the 
requestor seeing. So in our case the difference just causes confusion. But to 
answer your question it is in the scripts and templates. If you want to keep 
the defaults as they are for comment vs reply, change the apply to requestor on 
resolve scrip to include the comments. 

Sent from my mobile device. 

On May 18, 2012, at 4:42 PM, Sandra Wittenbrock san...@hpcrd.lbl.gov wrote:

 Hello,
 
 When I resolve a ticket, I want the requester to receive the ticket
 comments, and a notice the ticket is resolved, in just one email.
 Someone out there must have this set up.  I've been playing with
 TransactionBatch to see if that could help prevent duplicates.
 
 Currently, I use a default resolve scrip, which notifies the requester
 when the ticket is resolved.  The template does not include the comments
 from the resolution, only some generic text.
 
 I've been going in circles trying to have the requester get only one
 ticket upon resolution.  An email which includes the resolution comments.
 
 If when I resolve the ticket, I change the Update Type to Reply to
 Requestors, the requester gets one email, without the comments.
 
 Here is the summary of my scrips.
 
 
#DescriptionStageConditionActionTemplate
14Notify Requestor on CorrespondTransactionCreateOn 
 CorrespondNotify RequestorsAdmin Correspondence
13Notify requestor when ticket is takenDisabledOn Owner 
 ChangeNotify RequestorsOwner Changed
8On Comment Notify AdminCcs as CommentTransactionBatchOn 
 CommentNotify AdminCcs as CommentAdmin Comment
9On Comment Notify Other Recipients as CommentDisabledOn 
 CommentNotify Other Recipients as CommentCorrespondence
5On Correspond Notify AdminCcsTransactionBatchOn Correspond   
  Notify AdminCcsAdmin Correspondence
6On Correspond Notify CcsTransactionBatchOn Correspond
 Notify CcsCorrespondence
7On Correspond Notify Other RecipientsDisabledOn Correspond   
  Notify Other RecipientsCorrespondence
17On Correspond Notify RequestorTransactionBatchOn Correspond 
Notify Owner, Requestors, Ccs and AdminCcsAdmin Correspondence
1On Correspond Open TicketsTransactionCreateOn Correspond
 Open TicketsBlank
3On Create Autoreply To RequestorsTransactionCreateOn Create  
   Autoreply To RequestorsAutoreply
4On Create Notify AdminCcsTransactionCreateOn Create
 Notify AdminCcsTransaction
15On Owner Change Notify AdminccTransactionCreateOn Owner 
 ChangeNotify AdminCcs as CommentOwner Changed
2On Owner Change Notify OwnerDisabledOn Owner Change
 Notify OwnerOwner Changed
18On Owner Change Notify RequestorTransactionBatchOn Owner 
 ChangeNotify RequestorsOwner Changed
10On Resolve Notify RequestorsTransactionBatchOn Resolve
 Notify Owner, Requestors, Ccs and AdminCcsResolved
11On transaction, add any tags in the transaction's subject to the 
 ticket's subjectTransactionCreateOn TransactionExtract Subject 
 TagBlank
 (Check box to delete)
 
 
 
 I've looked at the mysql settings/tables.  I've looked at the logs, and
 am trying to see where in the code it is asking to send all these
 emails.  There is a section where it prevents sending emails to
 blacklisted addresses.  It would be nice if it prevented duplicates.  I
 haven't used perl in a while, so haven't been able to modify.
 
 Sandra


Re: [rt-users] How do I override a default scrip?

2012-05-18 Thread Paul Tomblin
On Fri, May 18, 2012 at 5:40 PM, Paul Tomblin ptomb...@xcski.com wrote:
 rtusers-20090...@billmail.scconsult.com wrote:
 Another option is to modify the Global Scrip with a User Defined Condition
 that returns 0 if the Queue is one that you want to exempt.

 How do I programmatically add one of these User Defined Conditions to
 an existing RT Global Scrip?  (Preferably something that I can do in
 my etc/initialdata)

Oh wait, I could do that with an overlay, couldn't I?


-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin


Re: [rt-users] How do I override a default scrip?

2012-05-18 Thread Kenneth Crocker
Paul,

Scrips and templates have different functions, so of course they do not
have the same consistent behavior.

Kenn

On Fri, May 18, 2012 at 3:40 PM, Paul Tomblin ptomb...@xcski.com wrote:

 On Fri, May 18, 2012 at 5:40 PM, Paul Tomblin ptomb...@xcski.com wrote:
  rtusers-20090...@billmail.scconsult.com wrote:
  Another option is to modify the Global Scrip with a User Defined
 Condition
  that returns 0 if the Queue is one that you want to exempt.
 
  How do I programmatically add one of these User Defined Conditions to
  an existing RT Global Scrip?  (Preferably something that I can do in
  my etc/initialdata)

 Oh wait, I could do that with an overlay, couldn't I?


 --
 http://www.linkedin.com/in/paultomblin
 http://careers.stackoverflow.com/ptomblin



Re: [rt-users] How do I override a default scrip?

2012-05-18 Thread Bill Cole

On 18 May 2012, at 17:40, Paul Tomblin wrote:


On Fri, May 18, 2012 at 3:47 PM, Bill Cole
rtusers-20090...@billmail.scconsult.com wrote:
Another option is to modify the Global Scrip with a User Defined 
Condition

that returns 0 if the Queue is one that you want to exempt.


How do I programmatically add one of these User Defined Conditions to
an existing RT Global Scrip?  (Preferably something that I can do in
my etc/initialdata)


Ewww. Why???

With a running RT (i.e. a system where etc/initialdata has seen its 
single lifetime access) just go into the Scrip's definition 
(Configuration-Global-Scrips-$WhicheverOneYouAreChanging) and switch 
the Condition from whatever it is (e.g. On Comment) to User 
Defined and put some suitable perl in the Custom condition text area. 
See http://requesttracker.wikia.com/wiki/WriteCustomCondition for clues 
on suitable perl. See 
http://requesttracker.wikia.com/wiki/Documentation#Scrips for more links 
to doc on Scrips.


I suppose you *could* do the needful to put your custom scrip into 
etc/initialdata, but I can't see a way to make that a rational thing to 
do. It's name has meaning...




If I define a new
scrip with the same name as an existing one, it runs both of them.



Yes, it does. Scrips are objects that point to Queues by ID, Queues 
are not

objects that point to Scrips by name.


I'd just like to point out that's completely inconsistent with the way
Templates are done.


You may want to have inconsistency discussions with Jesse Vincent. I 
gave up trying to understand the reasoning behind RT internal 
architecture a couple of major versions ago. It wasn't a hobby that was 
making me happy... Now I just try to keep the useful facts in my head 
without judging what I really don't understand.


With that caveat, I think it's not true that the way Scrips relate to 
Queues is inconsistent with Templates. Templates also are either 
Queue-specific or Global and point to their Queue by ID, rather than the 
Queue pointing to them by name. This is pretty much orthodox data 
structuring.


Re: [rt-users] How do I override a default scrip?

2012-05-18 Thread Bill Cole

On 18 May 2012, at 18:40, Paul Tomblin wrote:

On Fri, May 18, 2012 at 5:40 PM, Paul Tomblin ptomb...@xcski.com 
wrote:

rtusers-20090...@billmail.scconsult.com wrote:
Another option is to modify the Global Scrip with a User Defined 
Condition

that returns 0 if the Queue is one that you want to exempt.


How do I programmatically add one of these User Defined Conditions to
an existing RT Global Scrip?  (Preferably something that I can do in
my etc/initialdata)


Oh wait, I could do that with an overlay, couldn't I?


Um, maybe YOU could, but I sure wouldn't try it that way...

Scrips are configuration data, not program code. This sort of Condition 
is going to reference specific Queues in your instance, so you really 
want it in the database where you can easily tweak it and where there's 
no way for it to conflict with the next minor version of RT.


Re: [rt-users] How do I override a default scrip?

2012-05-18 Thread Paul Tomblin
On Fri, May 18, 2012 at 11:51 PM, Bill Cole
rtusers-20090...@billmail.scconsult.com wrote:
 On 18 May 2012, at 17:40, Paul Tomblin wrote:

 On Fri, May 18, 2012 at 3:47 PM, Bill Cole
 rtusers-20090...@billmail.scconsult.com wrote:

 Another option is to modify the Global Scrip with a User Defined
 Condition
 that returns 0 if the Queue is one that you want to exempt.


 How do I programmatically add one of these User Defined Conditions to
 an existing RT Global Scrip?  (Preferably something that I can do in
 my etc/initialdata)


 Ewww. Why???

Because I want to provide an extension that my client can install on
their RT installation, and when they type make initdb in the source
directory for my extension it adds all the things that are particular
to that extension to the RT system.  Just like the way literally
dozens of other extensions that I've looked at do it.



 With a running RT (i.e. a system where etc/initialdata has seen its single
 lifetime access) just go into the Scrip's definition
 (Configuration-Global-Scrips-$WhicheverOneYouAreChanging) and switch the
 Condition from whatever it is (e.g. On Comment) to User Defined and
 put some suitable perl in the Custom condition text area. See

I don't want to have to log into their RT systems and configure them
for them.  I want them to be able to install it on as many or as few
RT systems as they want just by typing make; make initdb; make
install just like every other RT extension.


 With that caveat, I think it's not true that the way Scrips relate to Queues
 is inconsistent with Templates. Templates also are either Queue-specific or
 Global and point to their Queue by ID, rather than the Queue pointing to
 them by name. This is pretty much orthodox data structuring.

That is simply not true.  If I want to override the system provided
Resolved template for a particular queue, then all I have to do is
make a new template called Resolved on that queue.  It's referenced
by name, and only my new Resolved template will be used for that
queue.  If I want to override the behavior of the default On Resolve
Notify Requestors for a particular queue I can't just create a new
Scrip with the same name, because then it will run both Scrips.  There
is no definition of the word consistent which that fits the
definition of.


-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin


Re: [rt-users] How do I override a default scrip?

2012-05-18 Thread Bill Cole

On 19 May 2012, at 0:15, Paul Tomblin wrote:


On Fri, May 18, 2012 at 11:51 PM, Bill Cole
rtusers-20090...@billmail.scconsult.com wrote:

On 18 May 2012, at 17:40, Paul Tomblin wrote:


On Fri, May 18, 2012 at 3:47 PM, Bill Cole
rtusers-20090...@billmail.scconsult.com wrote:


Another option is to modify the Global Scrip with a User Defined
Condition
that returns 0 if the Queue is one that you want to exempt.



How do I programmatically add one of these User Defined Conditions 
to
an existing RT Global Scrip?  (Preferably something that I can do 
in

my etc/initialdata)



Ewww. Why???


Because I want to provide an extension that my client can install on
their RT installation, and when they type make initdb in the source
directory for my extension it adds all the things that are particular
to that extension to the RT system.  Just like the way literally
dozens of other extensions that I've looked at do it.


OIC.

Incidentally, this is the first mention of extension in this thread. 
Writing an RT extension may be something that has been done dozens of 
times, but it's hard to guess that anyone in particular is doing it and 
asking questions about it on this list. You might get better guesses out 
of the rt-devel list. I'm not there.


[...]
With that caveat, I think it's not true that the way Scrips relate to 
Queues
is inconsistent with Templates. Templates also are either 
Queue-specific or
Global and point to their Queue by ID, rather than the Queue pointing 
to

them by name. This is pretty much orthodox data structuring.


That is simply not true.  If I want to override the system provided
Resolved template for a particular queue, then all I have to do is
make a new template called Resolved on that queue.  It's referenced
by name, and only my new Resolved template will be used for that
queue.


That's an interesting fact that I'd somehow missed in 12 years of 
working with RT...


A Scrip references its Template by ID. Really. I'm looking at that in 
the database. It's also documented that way in the API docs, but looking 
further down I see hints of nefarious magic at RT::Template-Load() I 
also just tested and confirmed what you say: even if I specifically pick 
the Global:$Name Template in a Scrip, the $QueueName:$Name Template gets 
used. Spooky.



If I want to override the behavior of the default On Resolve
Notify Requestors for a particular queue I can't just create a new
Scrip with the same name, because then it will run both Scrips.  There
is no definition of the word consistent which that fits the
definition of.


But Scrips cannot be that way: there is no RT::Scrip=Name. There's a 
Description, but that would be analogous to a Template's Description. 
Since Scrips don't *HAVE* a Name, they can't override by Name, yes?


But I do concede that there's inconsistency. Thus is the world. 
Different things are different.