Freeside:3:Documentation:Administration:RT Workflow

From Freeside
Revision as of 13:53, 15 December 2015 by Mark (talk | contribs) (Documentation for RT subtasks)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Freeside 3.8 and above have a streamlined interface for setting up "Create Tickets" scrips in the typical case where some type of ticket will have a standard set of dependent tasks. To define subtasks for a ticket queue:

  1. Create a queue for this type of ticket, if you don't have one yet. Each queue can have only one set of subtasks.
  2. In the queue configuration, open the "Subtasks" tab on the top bar.
  3. For the first subtask, enter the subject and message for the dependent ticket.
    • Optionally, you can set the tickets to be created in a different queue.
    • You can check the "Prefix with main subject" box to have the subject line prefixed with the subject from the parent ticket.
  4. Click "Save changes".
  5. The page will refresh with space for a second subtask. Repeat as necessary for each subtask you want to create.

Setup subtasks.png

When adding a ticket to the queue, there will be a dropdown box labeled "Create subtasks". Set this to "Yes" and subtask tickets will be created. You can also create the ticket first, then set this field to "Yes" later to start the subtasks. Create ticket.png


Internally, setting up subtasks creates the following objects:

  • A ticket custom field named "Create subtasks", applied to the queue. This controls activation of subtasks on a per-ticket basis.
  • A scrip condition that tests that custom field and activates when its value is set to "Yes".
  • A template for the "CreateTickets" scrip action, containing the subtask subject and content and some standard ticket parameters.
    • In particular, the subtask always inherits the parent ticket's requestor and owner.
    • The parent ticket always has the subtask ticket added as a dependency, so it can't be resolved until all subtasks are complete.
  • A scrip using that scrip condition and template. The scrip will trigger when the ticket is created with "Create subtasks = Yes", or when "Create subtasks" is set to "Yes" by a later transaction.

The subject and content can include Perl code in { braces }. The main ticket is available as the variable "$TOP" (an RT::Ticket object).