Re: [rt-users] SetStatus and SetOwner scrip question

2009-09-25 Thread Mike Johnson
Thank you very much Ken. I am new to coding custom action codes, and didn't see the part where you need to tell the script to move on from custom action prep. on this page ... http://wiki.bestpractical.com/view/WriteCustomAction I was trying to move too fast :P. Thx for pointing that ou

Re: [rt-users] SetStatus and SetOwner scrip question

2009-09-25 Thread Ken Crocker
Mike, You didn't get my code correct. You forgot the "Force". (NO, I'm NOT saying "may the force be with you", gaagh!). Also, when creating a scrip, you must keep in mind that when you define the condition as :User-Defined", you SHOULD end with a return code in both the "Prep" & "Cleanup" area

Re: [rt-users] SetStatus and SetOwner scrip question

2009-09-25 Thread Kevin Falcone
On Fri, Sep 25, 2009 at 09:55:23AM -0400, Mike Johnson wrote: >Hi Kevin, > >Thx for that tidbit of info, > >In that file I found the correct syntax, out of Sean's set, the 2 below > will work, > >$self->TicketObj->SetOwner("Nobody"); >$self->TicketObj->SetOwner("10"); You'r

Re: [rt-users] SetStatus and SetOwner scrip question

2009-09-25 Thread Mike Johnson
Hi Kevin, Thx for that tidbit of info, In that file I found the correct syntax, out of Sean's set, the 2 below will work, $self->TicketObj->SetOwner("Nobody"); $self->TicketObj->SetOwner("10"); But, this is baffling me... This is my scrip Condition: On Queue Change Action: User Defined

Re: [rt-users] SetStatus and SetOwner scrip question

2009-09-24 Thread Ken Crocker
Mike, We use this for when a ticket is moved to another Queue: # set new Ticket Owner value my $ticket = $self->TicketObj; $ticket->SetStatus("new"); $ticket->SetOwner(10, 'Force'); return 1; The above code is put into the cleanup code. Hope this helps Kenn LBNL On 9/24/2009 1:02 PM, Mike J

Re: [rt-users] SetStatus and SetOwner scrip question

2009-09-24 Thread Kevin Falcone
On Thu, Sep 24, 2009 at 04:02:10PM -0400, Mike Johnson wrote: >I was looking through the list's history. > >The original email did not get an answer to it. > >The piece that interests me about this listserv topic(dating back to Aug > 2007) > > >Sean, and myself are trying t

Re: [rt-users] SetStatus and SetOwner scrip question

2009-09-24 Thread Mike Johnson
I was looking through the list's history. The original email did not get an answer to it. The piece that interests me about this listserv topic(dating back to Aug 2007) Sean, and myself are trying to set a ticket's owner to nobody on an action... He stated, I've tried: $self->Tick

RE: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Edge, Sean
Users Subject: Re: [rt-users] SetStatus and SetOwner scrip question Robert Long wrote: > Have you tried moving the scrip to from TransactionCreate to > TransactionBatch? You may have to enable it in your RT_SiteConfig.. > > .r' > > > Mathew Snyder wrote: >> St

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Mathew Snyder
Robert Long wrote: > Have you tried moving the scrip to from TransactionCreate to > TransactionBatch? You may have to enable it in your RT_SiteConfig.. > > .r' > > > Mathew Snyder wrote: >> Stephen Turner wrote: >> >>> At Tuesday 8/14/2007 02:41 PM, Mathew Snyder wrote: >>> I take

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Robert Long
Have you tried moving the scrip to from TransactionCreate to TransactionBatch? You may have to enable it in your RT_SiteConfig.. .r' Mathew Snyder wrote: > Stephen Turner wrote: > >> At Tuesday 8/14/2007 02:41 PM, Mathew Snyder wrote: >> >>> I take it back. It would appear you are corr

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Mathew Snyder
Stephen Turner wrote: > At Tuesday 8/14/2007 02:41 PM, Mathew Snyder wrote: >> > >> I take it back. It would appear you are correct. I set up the scrip >> to log >> it's actions on this particular line of code and I'm getting: >> >> [debug]: set owner: 814382: Owner changed from msnyder to Nobody

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Stephen Turner
At Tuesday 8/14/2007 02:41 PM, Mathew Snyder wrote: > I take it back. It would appear you are correct. I set up the scrip to log it's actions on this particular line of code and I'm getting: [debug]: set owner: 814382: Owner changed from msnyder to Nobody ((eval 510):4) However, there is no

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Mathew Snyder
Stephen Turner wrote: > > At Tuesday 8/14/2007 02:14 PM, Mathew Snyder wrote: >> I've tried: >> >> $self->TicketObj->SetOwner("Nobody"); >> $self->TicketObj->SetOwner(Nobody); >> $self->TicketObj->SetOwner("10"); >> $self->TicketObj->SetOwner(10); >> $self->TicketObj->SetOwner(Name => "Nobody"); >

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Mathew Snyder
Stephen Turner wrote: > > At Tuesday 8/14/2007 02:14 PM, Mathew Snyder wrote: >> I've tried: >> >> $self->TicketObj->SetOwner("Nobody"); >> $self->TicketObj->SetOwner(Nobody); >> $self->TicketObj->SetOwner("10"); >> $self->TicketObj->SetOwner(10); >> $self->TicketObj->SetOwner(Name => "Nobody"); >

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Stephen Turner
At Tuesday 8/14/2007 02:14 PM, Mathew Snyder wrote: I've tried: $self->TicketObj->SetOwner("Nobody"); $self->TicketObj->SetOwner(Nobody); $self->TicketObj->SetOwner("10"); $self->TicketObj->SetOwner(10); $self->TicketObj->SetOwner(Name => "Nobody"); $self->TicketObj->SetOwner(Name => Nobody); $

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Mathew Snyder
I've tried: $self->TicketObj->SetOwner("Nobody"); $self->TicketObj->SetOwner(Nobody); $self->TicketObj->SetOwner("10"); $self->TicketObj->SetOwner(10); $self->TicketObj->SetOwner(Name => "Nobody"); $self->TicketObj->SetOwner(Name => Nobody); $self->TicketObj->SetOwner(Id => "10"); $self->TicketObj

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Mathew Snyder
I figured out part of it: Typo was causing problems. As a result, the status is now being set to "new" as I was looking for. However, the owner is not being changed. I'm not seeing any errors in rt.log that would indicate why this is. I've only seen the messages telling me that scrips were bein

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Gene LeDuc
From your first post, I'm guessing that you want the status and owner set when a ticket is moved into a specific queue. Is this correct? Is your scrip in the "incoming" queue, the queue that the ticket is being moved into? Is anything being logged in your rt.log file? At 09:39 AM 8/14/2007,

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Mathew Snyder
I did what you suggested. It still isn't having an effect. The owner doesn't change nor does the status. Keep up with me and what I'm up to: http://theillien.blogspot.com Gene LeDuc wrote: > Hi Mathew, > > If you have that code in the Cleanup area, make sure you have a "return > 1;" in the Pr

Re: [rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Gene LeDuc
Hi Mathew, If you have that code in the Cleanup area, make sure you have a "return 1;" in the Prep area (otherwise the Cleanup code doesn't execute). I'm not sure that you can pass "Nobody" to the SetOwner method; I think it wants an Id rather than a name. Use $RT::Nobody->Id to get the Id f

[rt-users] SetStatus and SetOwner scrip question

2007-08-14 Thread Mathew Snyder
RT 3.6.1 Condition: On Queue Change Action: User Defined Template: Not sure which one I should be using I figure that that the Custom action cleanup code should be $self->TicketObj->SetStatus("new"); and $self->TicketObj->SetOwner("Nobody"); but nothing happens. This is my first attempt at a cus