Post Functions

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

For help navigating to ScriptRunner workflow functions, follow the steps in the Example Workflow Extension

  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.

Edit Post Function

  1. Navigate to ScriptRunner → Workflows. All existing workflows are displayed as default.
  2. Select Post Function from the Type drop down list. You will now see a refined list displayed.
  3. Click the Actions ellipsis for your preferred workflow and select Edit.
  4. Edit the post function fields and click Save.