Contrib: AutoAssign (RT2.0.x)

The attached RT::Action and insert script will automatically change the
ownership of a ticket if the following conditions are met:

Ticket is Owned by Nobody
User is Privileged
User can Own Tickets in the current Queue.

Effectively, the first User that can own a ticket who replies to the
Ticket, ends up Owning the ticket. (ie, if they have a public opinion on
a Problem, they then Own the Problem)

Recommended Scrip to apply would be:

OnCorrespondence AutoAssign with template Blank

Caveats - the WebUI puts in a SetOwner, meaning that you will see a quick
series of ‘RT_System gives ticket to Joe’, then ‘Joe gives ticket to
Nobody’, with the final Owner undefined, but predominately Nobody. The
current way of fixing this would be to patch
WebRT/html/Ticket/Elements/EditPeople to default to the current user if it
is currently Nobody. Ughity.

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

AutoAssign.pm (1.25 KB)

insert_action_AutoAssign.pl (1.53 KB)

To: rt-devel@lists.fsck.com
Subject: [rt-devel] Contrib: AutoAssign (RT2.0.x)

Actually, this should be ‘AutoTake’ as per notes leading to this. My
mistake for conflicting with an existing name (Jesse, could you apply
s/AutoAssign/AutoTake/ or would you prefer another copy? :wink: )

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

A while back, Bruce Campbell wrote:

The attached RT::Action and insert script will automatically change the
ownership of a ticket if the following conditions are met:

Caveats - the WebUI puts in a SetOwner, meaning that you will see a quick
series of ‘RT_System gives ticket to Joe’, then ‘Joe gives ticket to
Nobody’, with the final Owner undefined, but predominately Nobody. The
current way of fixing this would be to patch
WebRT/html/Ticket/Elements/EditPeople to default to the current user if it
is currently Nobody. Ughity.

The attached patch takes care of this. (It’s actually to
Ticket/Update.html.) Ughity indeed; the logic is starting
to become hard to understand. :wink:

This patch also has a caveat: it applies equally to Comment
transactions done via the WebUI as to Correspondence. While
it would be possible to trigger only on correspond, this
adds more hard to follow (IMO) conditional bits and just
isn’t worth the hassle for me. Someone else might want to
do it, though.

default-owner-patch (986 Bytes)