Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

This post function allows you to transition issues when another transition is performed. For example this , this post function can be used in the following scenarios:

  • Automatically close an issue when it's resolved and the current user is allowed to close the issue.
  • Reopen the issue when the "Not fixed" resolution is selected on the Resolve issue transition (can be combined with the Validator-Based Post Function in this case).


Element summary
Status
Status
colourGreen
titleCurrent
Version compatibility6.0.1 - Latest
SupportedYes
Introduced in version1.0.0


Post function parameters

 This post function takes the following parameters:

  • Which transition - a method of transition selection
    • Transition by name or id - simply enter the name or ID of the transition (it must be available in the current issue state)
    • Transition to status - select a destination status and a post function to execute the first matching transition (try until the first transition is successful).
  • As a user - select a user who will perform the transition. If empty, then the current user is used. 


Caution!

There are two things that you should be aware of  when using this post function:

  • Post function works without user interaction. Therefore, it's unable to execute the transition with screen.
  • This post function causes issues to execute transitions. Issues cannot execute transitions while they are still executing a transition. This means that a post function should be executed after saving the previous transition. Every transition has fixed post functions which save the state after the transition:
    1. "Update change history for an issue and store the issue in the database."
    2. "Re-index an issue to keep indexes in sync with the database."
    It's crucial to place the "Transition this issue" post function after those two.

Example of use