A post function is a workflow function that performs automated actions after an issue transitions to a new status. ScriptRunner has several built-in post functions. Each function contains a condition that can be used to dismiss the rest of the script if it returns false. Most functions also have additional code that can execute to modify the final action of the function.

There are several ways to enhance your workflow using post functions, including:

  • Automatically add or remove an issue from the active sprint after it is transitioned.

  • Change the assignee of an issue after it’s transitioned.

  • Send a notification on the transition of an issue.

Create Post Function

  1. Select the transition you wish to add the post function to.

  2. Click Post Function→Add Post Function.

  3. Select the ScriptRunner Post Function option then Add.

  4. Select a post function from the list of available functions. For example Add/Remove From Script.

  5. In the Description field, enter a short description of the post function.

  6. Select Enable Post Function to enable it as soon as it is added.

Different options are available depending on the post function added, see the examples for each post function in this section for field descriptions along with Additional Code.

For help navigating to ScriptRunner workflow functions, follow the steps to navigate to workflow functions.

Edit Post Function

  1. Select the transition the post function is on.

  2. Click Post Functions. A list of all post functions on the selected transition is shown.

  3. To edit an existing post function, click the Pencil.

  4. Edit the post function and click Update.