Re: [rt-users] Help with Scrip for child / dependent tickets

2015-05-22 Thread Christian Loos
Hi, this is what we use: my $deps = $self-TicketObj-DependedOnBy; while( my $link = $deps-Next ) { next unless $link-BaseURI-IsLocal; my $dep = $link-BaseObj; next if $dep-QueueObj-IsInactiveStatus($dep-Status); $dep-SetStatus('open') unless $dep-HasUnresolvedDependencies; }

Re: [rt-users] Help with Scrip for child / dependent tickets

2015-05-22 Thread Jon Witts
Hi Chris, Thanks for the pointer; I will update the scrip accordingly. Thanks, Jon - Jon Witts Director of Digital Strategy Queen Margaret's School Escrick Park York YO19 6EU Telephone: 01904 727600 Fax: 01904 728150 Website:

Re: [rt-users] Help with Scrip for child / dependent tickets

2015-05-17 Thread Aaron Guise
Hi Jon, I had a similar requirement I suppose. I had an original (Parent) ticket and this ticket has two dependent tickets at a certain stage before proceeding down the rest of the workflow. I achieved this requirement by having a scrip running when the dependent tickets are completed to

[rt-users] Help with Scrip for child / dependent tickets

2015-05-08 Thread Jon Witts
Hi there, We are wanting to have a scrip run on our queues which will move a ticket back to the open state if all of its child and dependent tickets are closed (resolved, rejected or deleted). I have found Ruslan's scrip which opens a ticket once all of its child tickets are closed here on

[rt-users] Help with scrip for adding values to Custom Field

2011-08-24 Thread Kenneth Crocker
To list, I have a Custom Field I use as a To address for Others in a template; To: {$Ticket-FirstCustomFieldValue('QA Approver')} This CF is a Select One Value type. Now I have a situation that is similar, except that there will be more than one address to use. I figured I'd define the CF as

Re: [rt-users] Help with scrip for adding values to Custom Field

2011-08-24 Thread Kenneth Crocker
To List, I got it to work in terms of adding several good email addresses with this: = while ($UserObj = $GroupMembersObj-Next) { my $UserEmail = $UserObj-EmailAddress; my $cf_obj = RT::CustomField-new($RT:: SystemUser);

Re: [rt-users] Help with Scrip to move a ticket into a new queue

2011-08-23 Thread Ruslan Zakirov
You need 'return 1;' in preparation code. Regards, Ruslan. From phone. 23.08.2011 3:16 пользователь Gilbert Rebeiro gilb...@dido.ca написал: Hi, I a queue called fr There is a simple autoreply that is bound to this queue. Scrip is setup: Condition: OnCreate Action: User defined

Re: [rt-users] Help with Scrip to move a ticket into a new queue

2011-08-23 Thread Kenneth Crocker
Gilbert, You might also want to remove the return 1; in the custom Condition code since you have already set the condition as OnCreate. It isn't needed. I don't know if it messes anything up, but I wouldn't leave anything in a coded area that isn't needed. Hope this helps. Kenn LBNL On Tue,

Re: [rt-users] Help with Scrip to move a ticket into a new queue

2011-08-23 Thread Gilbert Rebeiro
Excellent,, , it worked. Many thanks to all that helped. On 23/08/2011 11:14 AM, Kenneth Crocker wrote: Gilbert, You might also want to remove the return 1; in the custom Condition code since you have already set the condition as OnCreate. It isn't needed. I don't know if it messes anything

[rt-users] Help with Scrip to move a ticket into a new queue

2011-08-22 Thread Gilbert Rebeiro
Hi, I a queue called fr There is a simple autoreply that is bound to this queue. Scrip is setup: Condition: OnCreate Action: User defined Template: Autoreply Stage: TransactionCreate Custom condition: return 1; Custom action preparation code: Custom action cleanup code: # Change queue my

Re: [rt-users] help with scrip (search correspond body)

2011-08-19 Thread Robert Vicchiullo
Cc: rt-users@lists.bestpractical.com Subject: Re: [rt-users] help with scrip (search correspond body) On Fri, Aug 19, 2011 at 1:15 AM, Kenneth Crocker kfcroc...@lbl.gov wrote: Robert, As I mentioned earlier, YOU can control what goes out on an email via the template. Why don't you just modify

Re: [rt-users] help with scrip (search correspond body)

2011-08-18 Thread Robert Vicchiullo
@lists.bestpractical.com Subject: Re: [rt-users] help with scrip (search correspond body) Robert, Have you tried creating two different resolve notification scrips? 1 for the requestor (that uses a template with no content) and 1 for others that uses a template with all the content? I'm not sure if that is what you

Re: [rt-users] help with scrip (search correspond body)

2011-08-18 Thread Kenneth Crocker
@lists.bestpractical.com *Subject:* Re: [rt-users] help with scrip (search correspond body) ** ** Robert, Have you tried creating two different resolve notification scrips? 1 for the requestor (that uses a template with no content) and 1 for others that uses a template with all

Re: [rt-users] help with scrip (search correspond body)

2011-08-18 Thread Robert Vicchiullo
it will be blank. From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kenneth Crocker Sent: Thursday, August 18, 2011 2:16 PM To: rt-users@lists.bestpractical.com Subject: Re: [rt-users] help with scrip (search correspond body) Robert

Re: [rt-users] help with scrip (search correspond body)

2011-08-18 Thread Ruslan Zakirov
...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kenneth Crocker Sent: Wednesday, August 17, 2011 9:01 AM To: rt-users@lists.bestpractical.com Subject: Re: [rt-users] help with scrip (search correspond body) Robert, Have you tried creating two different

Re: [rt-users] help with scrip (search correspond body)

2011-08-17 Thread Robert Vicchiullo
Vicchiullo Cc: RT-Users@lists.bestpractical.com Subject: Re: [rt-users] help with scrip (search correspond body) Hi, What exactly are you trying to do? Why do you need custom condition when RT has On Correspond out of the box? On Wed, Aug 17, 2011 at 2:44 AM, Robert Vicchiullo r...@hautelook.com

Re: [rt-users] help with scrip (search correspond body)

2011-08-17 Thread Kenneth Crocker
] Sent: Tuesday, August 16, 2011 3:49 PM To: Robert Vicchiullo Cc: RT-Users@lists.bestpractical.com Subject: Re: [rt-users] help with scrip (search correspond body) Hi, What exactly are you trying to do? Why do you need custom condition when RT has On Correspond out of the box? On Wed

Re: [rt-users] help with scrip (search correspond body)

2011-08-17 Thread Ruslan Zakirov
of Ruslan Zakirov [r...@bestpractical.com] Sent: Tuesday, August 16, 2011 3:49 PM To: Robert Vicchiullo Cc: RT-Users@lists.bestpractical.com Subject: Re: [rt-users] help with scrip (search correspond body) Hi, What exactly are you trying to do? Why do you need custom condition when RT has

Re: [rt-users] help with scrip (search correspond body)

2011-08-16 Thread Robert Vicchiullo
-Original Message- From: ruslan.zaki...@gmail.com [mailto:ruslan.zaki...@gmail.com] On Behalf Of Ruslan Zakirov Sent: Sunday, August 14, 2011 1:59 PM To: Robert Vicchiullo Cc: RT-Users@lists.bestpractical.com Subject: Re: [rt-users] help with scrip (search correspond body) On Sat, Aug 13, 2011 at 12

Re: [rt-users] help with scrip (search correspond body)

2011-08-16 Thread Ruslan Zakirov
Of Ruslan Zakirov Sent: Sunday, August 14, 2011 1:59 PM To: Robert Vicchiullo Cc: RT-Users@lists.bestpractical.com Subject: Re: [rt-users] help with scrip (search correspond body) On Sat, Aug 13, 2011 at 12:57 AM, Robert Vicchiullo r...@hautelook.com wrote: Need a little help and would

[rt-users] help with scrip (search correspond body)

2011-08-12 Thread Robert Vicchiullo
Need a little help and would appreciate any advice. I am trying to write a scrip for On Correspond Notify Requestors and Ccs I have Condition set to User defined and stage set to transactionbatch. In Custom condition I have: my $Content = $self-TransactionObj-Attachments-First-Content;

Re: [rt-users] help with scrip (search correspond body)

2011-08-12 Thread Robert Vicchiullo
To: RT-Users@lists.bestpractical.com Subject: [rt-users] help with scrip (search correspond body) Need a little help and would appreciate any advice. I am trying to write a scrip for On Correspond Notify Requestors and Ccs I have Condition set to User defined and stage set to transactionbatch

Re: [rt-users] Help with scrip for Custom Field

2011-08-08 Thread Kevin Falcone
On Fri, Aug 05, 2011 at 03:18:54PM -0700, Kenneth Crocker wrote: To all, I have a Custom Field with the type=Upload multiple images. I want to put in an attachment (gif or jpeg) from an email. The scrip I have written uses this to get the pic: my $trans =

Re: [rt-users] Help with scrip for Custom Field

2011-08-08 Thread Kenneth Crocker
Kevin, I don't understand the term limitdown, but I'll try to create a loop. Am I correct with the code Attachments-First-ContentType(Value = 'image/gif') and should that be the main condition in the loop (got an example)? Thanks. Kenn LBNL On Mon, Aug 8, 2011 at 7:43 AM, Kevin Falcone

Re: [rt-users] Help with scrip for Custom Field

2011-08-08 Thread Kevin Falcone
On Mon, Aug 08, 2011 at 09:23:03AM -0700, Kenneth Crocker wrote: I don't understand the term limitdown, but I'll try to create a loop. Am I correct with the code Attachments-First-ContentType(Value = 'image/gif') and should that be the main condition in the loop (got an

Re: [rt-users] Help with scrip for Custom Field

2011-08-08 Thread Kenneth Crocker
Kevin, Thanks. Sorry for the ignorant questions. I'm not a perl programmer. I just try to cobble examples together and test them out. I'll look thru that. Hopefully there's an example of limit code for images. Thanks again. Kenn LBNL On Mon, Aug 8, 2011 at 9:38 AM, Kevin Falcone

[rt-users] Help with scrip for Custom Field

2011-08-05 Thread Kenneth Crocker
To all, I have a Custom Field with the type=Upload multiple images. I want to put in an attachment (gif or jpeg) from an email. The scrip I have written uses this to get the pic: my $trans = $self-TransactionObj; my $pic = $trans-Attachments-First-ContentType(Value = 'image/gif'); (this 'gif'

[rt-users] Help with scrip using DiffAsString

2011-07-14 Thread Kenneth Crocker
To list, I'm trying to create a scrip that gives me the difference between the started date and the resolved date when the ticket is resolved: This is my scrip: Condition: On Resolve Action: User-defined Template: Blank Stage: TransBatch Custom Prep Code: return 1; Custom Cleanup Code: # Set

[rt-users] Help with scrip example

2011-01-31 Thread Edwards, James
Hello all, I'm hoping someone can point me in a direction. I'm trying to write a custom scrip that takes emails sent in reply to an RT ticket and merges it into an existing RT ticket. The existing ticket is in a queue. The issue I'm trying to overcome is that when the reply message comes

Re: [rt-users] Help with scrip example

2011-01-31 Thread Paul
This isn't quite what your asking for, but solves the same problem: http://code.google.com/p/rt-references/ Cheers, Paul On 01/31/2011 02:31 PM, Edwards, James wrote: Hello all, I'm hoping someone can point me in a direction. I'm trying to write a custom scrip that takes emails sent in

[rt-users] help with scrip from wiki

2009-03-30 Thread Tom Lahti
I don't see anything wrong with this, but I haven't done much scrip programming. I took the scrip from http://wiki.bestpractical.com/view/AddTicketHistoryToMail and made a template with it, pretty much verbatim. Only problem is, when the email is sent the Complete Ticket History section is

Re: [rt-users] help with scrip from wiki

2009-03-30 Thread Tom Lahti
I don't see anything wrong with this, but I haven't done much scrip programming. I took the scrip from http://wiki.bestpractical.com/view/AddTicketHistoryToMail I think I've solved my own problem. There's a regex in the script that skips transactions where the content type is text/html ...

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) ) {

Re: [rt-users] help with scrip

2008-10-20 Thread Violetta Wawryk
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

Re: [rt-users] help with scrip

2008-10-20 Thread Kenneth Crocker
Violetta, I missed this thread. What are you trying to do? Kenn LBNL On 10/19/2008 11:53 PM, 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

Re: [rt-users] help with scrip

2008-10-17 Thread Violetta Wawryk
Hi Rene, brauch mal dringend hilfe vom perlguru. ich möchte was abfrage und zwar wenn ich im subject akut *nicht* drinnen steht dann solls zutreffen $self-TicketObj-Subject !=~ /[A|a]kut: / -- tut nicht $self-TicketObj-Subject !~ /[A|a]kut: / -- tut nicht wie muss das denn richtig heissen

Re: [rt-users] help with scrip

2008-10-17 Thread Violetta Wawryk
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

Re: [rt-users] help with scrip

2008-10-17 Thread Violetta Wawryk
sorry, the german mail was not meant for the mailinglist *args* -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered

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

[rt-users] help with scrip

2008-10-16 Thread Violetta Wawryk
Hi, I have different scrips that check for certain words in the subject line and the code looks for example like that: if ($self-TransactionObj-Type eq Create $self-TicketObj-Subject =~ /[A|a]kut: / ) --snip-- so, if the subject contains akut do something. That works. What I now want to

Re: [rt-users] help with scrip

2008-10-16 Thread Violetta Wawryk
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

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

[rt-users] Help with Scrip to change requestor address on creation...

2007-05-08 Thread James Price
I would like to write a scrip for a specific queue that changes the requestor address or just deletes it upon creation. I'm a bit green with RT scrips, so any help, pointers or suggestions would be helpful. Thanks, James James R. Price DigitalCiti.com 3636 S. Iron St., Chicago, IL 60609 Company

Re: [rt-users] Help with Scrip to change requestor address on creation...

2007-05-08 Thread Robert Long
Someone please correct me if I'm wrong, but wouldn't this do it? $self-TicketObj-DeleteWatcher( Type=Requestor, $self-TicketObj-RequestorAddresses); put that in a scrip with condition set to 'on create' in the queue that you want that functionality. .r' James Price wrote: I would like to

Re: [rt-users] Help with scrip

2007-05-07 Thread Kenneth Crocker
Gene, DUH!! Thanks for the help. Kenn LBNL Gene LeDuc wrote: Hi Kenn, Lose the $ in front of TransactionObj. It should be $self-TransactionObj. Gene At 04:01 PM 5/7/2007, Kenneth Crocker wrote: Gene, Thanks, But it still doesn't work. I now have return 0 unless

[rt-users] Help with scrip

2007-04-27 Thread Kenneth Crocker
To all, I cannot get the following scrip to run: # # Check for Nobody' before continuing - saves spam # return 0 unless $self-$TransactionObj-Field eq 'Owner'; return 0 unless $self-$TransactionObj-OldValue ne 'Nobody'; return 1; Any ideas? Kenn LBNL

Re: [rt-users] Help with scrip

2007-04-27 Thread Gene LeDuc
Hi Kenn, You want to be comparing OldValue to $RT-Nobody-Id instead of to 'Nobody' like so: return 0 unless $self-TransactionObj-OldValue == $RT::Nobody-Id; Gene At 12:03 PM 4/27/2007, Kenneth Crocker wrote: To all, I cannot get the following scrip to run: # # Check for Nobody'