Access Keys:
Skip to content (Access Key - 0)

Q: How do I set up my queue to automatically make the creator the owner of a ticket?

  • How can I configure my Request Tracker (RT) queue to automatically assign a ticket to the person who creates it?

Answer

If you have a workflow in your team using Request Tracker where every ticket is assigned to someone before it is worked on, or if your queue is set up to use the "Owner Lock" feature in MIT's RT instance, then it may be helpful to you to configure your queue to automatically assign a new ticket to its creator if the ticket is created via the web interface. This can be done through a "scrip" attached to your queue.

Please note that, even as a queue administrator, you may not have permission to create user defined actions and conditions in your scrip. Using this functionality requires in-depth understanding of RT and knowledge of Perl, and is not a right automatically granted to queue administrators. Please contact tooltime@mit.edu if you would like us to set this up for you on your queue, or if you'd like to talk about expanded queue administrator permissions.

Steps to set this scrip up for a queue

  1. Hover your mouse over the "Tools" expanding nav button and select "Configuration", then "Queues", then "Select" from the menu that pops up
  2. Find your queue in the list of queues when it finishes loading, and click on it
  3. Hover your mouse over the "Scrips" expanding nav button and select "Select"
  4. Visually inspect the list of scrips that currently apply to your queue to refresh your memory on the notifications and automatic actions already in place for your queue
  5. Hover your mouse over the "Scrips" expanding nav button again and select "Create"
  6. On the form page to create a new scrip, verify that you can see a section titled "User Defined conditions and actions"; if you do not see this section, you cannot complete these instructions yourself and need to request that this be set up for you by sending mail to tooltime@mit.edu
  7. If you can see the section titled "User Defined conditions and actions" then proceed to fill out the new scrip form as follows:
    1. In the section "Scrip fields":
      1. Description = On Web Create set Owner to Current User if possible
      2. Condition = On Web Create
      3. Action = User Defined
      4. Template = Global Template: Blank
      5. Stage = TransactionCreate
    2. In the section "User Defined conditions and actions":
      1. Leave the box "Custom condition" blank
      2. In the box "Custom action preparation code" enter:
        return 1;
      3. In the box "Custom action cleanup code" enter:
        # get actor ID
        my $Actor = $self->TransactionObj->Creator;
        
        # if actor is RT_SystemUser then get out of here
        return 1 if $Actor == $RT::SystemUser->id;
        
        # get out unless ticket owner is nobody
        return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
        
        # ok, try to change owner
        $RT::Logger->info("Auto assign ticket #". $self->TicketObj->id ." to user #". $Actor );
        my ($status, $msg) = $self->TicketObj->SetOwner( $Actor );
        unless( $status ) {
          $RT::Logger->error( "Impossible to assign the ticket to $Actor: $msg" );
          return undef;
        }
        return 1;
    3. Click the button labeled "Create" to create the scrip

See also

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

July 28, 2017

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
request_tracker request_tracker Delete
c-rt-queue-admin c-rt-queue-admin Delete
c-rt-queue-admin-ownership-assignment c-rt-queue-admin-ownership-assignment Delete
c-rt-enduser-ownership-assignment c-rt-enduser-ownership-assignment Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki