Auto change Queue on Take

I found this on the wiki:
http://requesttracker.wikia.com/wiki/AutoChangeQueue

and it appears we are already using it in variation, that is why I sought after it. I finally found our version, exactly the same except for queue and group names, but it is not working. Is it because we are authenticating via LDAP? It is a 3.8.4 database moved to a RT4.0.2 installation and upgraded, so the Scrip was already there. It works in our current production (3.8.4), but not in the test 4.0.2. Any ideas why this would not work automatically in 4.0.2 when nothing has changed EXCEPT authentication?

I still see my account list in mySQL and is listed as a member of the group in use and full access to the queue in use. I have added some debuggers in. I can see it start, but the after the:
return 1 unless $self->TransactionObj->Type eq ‘Take’;
there is another logger and it never shows up in the rt.log file. It appears to never makes it past this point.

I just ran into similar issue and it seems that:

return 1 unless $self->TransactionObj->Type eq ‘Take’;

does not work in RT 4.0.4. I checked the Transactions table in the database
and it looks like the type is inserted as “Set” when clicking the Take
button. I found a CustomConditionSnippet for Take here:
http://requesttracker.wikia.com/wiki/CustomConditionSnippets

my $txn = $self->TransactionObj;
return 0 unless $txn->Type eq “Set”;
return 0 unless $txn->Field eq “Owner”;
return 0 unless $txn->OldValue == $RT::Nobody->id;
return 0 unless $txn->NewValue == $txn->Creator;
return 1;

This does work, but it also fires the scrip when assigning a ticket to
oneself while within a ticket if the owner was nobody.

Can anyone confirm whether or not $self->TransactionObj->Type eq
‘Take’; changed intentionally or if this is actually a bug?

Thanks!
JimOn Tue, Oct 18, 2011 at 5:42 PM, Izz Abdullah Izz.Abdullah@hibbett.comwrote:

I found this on the wiki:****

http://requesttracker.wikia.com/wiki/AutoChangeQueue****


and it appears we are already using it in variation, that is why I sought
after it. I finally found our version, exactly the same except for queue
and group names, but it is not working. Is it because we are
authenticating via LDAP? It is a 3.8.4 database moved to a RT4.0.2
installation and upgraded, so the Scrip was already there. It works in our
current production (3.8.4), but not in the test 4.0.2. Any ideas why this
would not work automatically in 4.0.2 when nothing has changed EXCEPT
authentication?****


I still see my account list in mySQL and is listed as a member of the
group in use and full access to the queue in use. I have added some
debuggers in. I can see it start, but the after the:****

return 1 unless $self->TransactionObj->Type eq ‘Take’;****

there is another logger and it never shows up in the rt.log file. It
appears to never makes it past this point.****


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Washington DC, USA — October 31 & November 1, 2011
  • Barcelona, Spain — November 28 & 29, 2011

I just ran into similar issue and it seems that:
return 1 unless $self->TransactionObj->Type eq Take;
does not work in RT 4.0.4. I checked the Transactions table in the database and it looks like
the type is inserted as “Set” when clicking the Take button. I found a CustomConditionSnippet
for Take here: [1]http://requesttracker.wikia.com/wiki/CustomConditionSnippets
my $txn = $self->TransactionObj;
return 0 unless $txn->Type eq “Set”;
return 0 unless $txn->Field eq “Owner”;
return 0 unless $txn->OldValue == $RT::Nobody->id;
return 0 unless $txn->NewValue == $txn->Creator;
return 1;
This does work, but it also fires the scrip when assigning a ticket to oneself while within a
ticket if the owner was nobody.
Can anyone confirm whether or not $self->TransactionObj->Type eq Take; changed intentionally
or if this is actually a bug?

This was an intentional change in 4.0 to normalize the types of transactions.
Type being Take was a weird outlier, when other field changes in RT
had a Type of Set and then you checked the Field to see what changed.

Your code is emulating Take properly (changed Owner from Nobody to Actor).
It sounds like you might mean Steal, which is OldValue != RT->Nobody->id.

$ git show 3dcca451f932849cbffebcd71f34ddbe54dd9890
commit 3dcca451f932849cbffebcd71f34ddbe54dd9890
Author: sunnavy sunnavy@bestpractical.com

for SetOwner: txn type is always Set, but we also want the customized description, which can be accomplished by checking the old/new values

$ git tag --contains 3dcca451f932849cbffebcd71f34ddbe54dd9890

rt-4.0.0

-kevin