Re: [rt-users] Scrip - On close set CF to owner name and then change owner to nobody

2011-10-05 Thread Bart
Hi, After some more testing the below scrip doesn't seem to do what it should.. It now does work but it fills in the wrong user. Sometimes a colleague of mine instead of myself, while I'm the person hitting Resolved. Or sometimes root, I guess because it runs a scrip when closing and the actual

Re: [rt-users] Scrip - On close set CF to owner name and then change owner to nobody

2011-10-05 Thread Bart
After some more playing around and search it now seems to be fixed permenantly (I hope at least lol) This scrip does what I want it to do: my $actor_id = $self-TransactionObj-Creator; my $temp_user = RT::User-new(); $temp_user-Load($actor_id); my $actor_name = $temp_user-Name();

[rt-users] Scrip - On close set CF to owner name and then change owner to nobody

2011-10-04 Thread Bart
Hi, I'm currently struggling with this scrip, in separate parts it works but together it kinda makes a mess O_o Some background on the scrip. We want the ticket owner to be set to Nobody on close, when tickets reopen they will show up in the New/nobody queue for everyone in a support group to

Re: [rt-users] Scrip - On close set CF to owner name and then change owner to nobody

2011-10-04 Thread Bart
Never mind... I just stumbled upon the CreatorObj. Changed the scrip to the following: my $my_owner = $self-TicketObj-CreatorObj-Name; $self-TicketObj-AddCustomFieldValue(Field = 'Last Owner', Value = $my_owner); my ($code, $msg) = $self-TicketObj-SetOwner(6, 'Force'); return 1; This gave