Introduction
This post function allows you to transition issue when another transition is performed.This post function can be used for example in following scenarios:
- Automatically close an issue when it's resolved and current user is allowed to close the issue
- Reopen issue when "Not fixed" resolution is selected on Resolve issue transition (can be combined with Validator Based Post Function in this case).
Element summary | |
---|---|
Status | CURRENT |
Version compatibility | 6.0.1 - Latest |
Supported | Yes |
Introduced in version | 1.0.0 |
Post function parameters
Post function takes following parameters:
- Which transition - method of transition selection
- Transition by name or id - simply enter name or ID of transition (it must be available in current issue state)
- Transition to status - select destination status and post function execute first matching transition (try until first transition is successful).
- As user - select user who will perform the transition. If empty then current user is used.
Caution
There are two things, you should be aware of, when using this post function:
- Post function works without user interaction. Therefore, it's unable to execute transition with screen.
- This postfunction causes issue to execute transition. Issue cannot execute transition, while still executing transition. That means, that post function should be executed, after saving previous transition. Every transition has fixed postfunctions, that save state after 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 "Transition this issue" postfunction after those two.