Post function trigger type
Jira hosting: Data Center (since v6.11.0)
Please, note that in Cloud, Post function trigger type is not supported.
How it works:
This trigger type allows you to schedule a Scheduled Issue execution whenever an Issue in a selected Project goes through a specified workflow transition.
For example, whenever an Issue in the project “Main” transitions to the “To Do” status, the “4070” Scheduled Issue will execute.
How to set it up:
Post function triggers can be configured in the Workflows section of Jira settings. To navigate there, follow the path:
Jira administration > Issues > Workflows
From here, proceed with the Edit option for the workflow of your choice (or create a new one). In the diagram view, click on any transition to open modal (the window visible on the right side of the screenshot below) and then select Post functions.
The Post Function Trigger can be added to all transitions, both Jira and custom.
Once there, a new post function can be added via the Add post function button.
The Post function you need is “The Scheduler: Post function Trigger”
Jira will then ask you to specify the Project (note that only active projects will be displayed) and the Scheduled Issue for the post function.
You may choose the option to stop the workflow transition if the SI execution fails. This option is selected by default, if you do not want to use it, it should be unchecked.
The post function has now been added successfully, and whenever any issue in the “Main” project transitions to the “To Do” status, the “4070” SI will execute.
The Post Function Trigger can be assigned to only one SI. If you want multiple SIs to execute, you must create a separate trigger for each one.
The workflow configuration page can also be easily accessed by Jira Administrator from the 3rd step of SI Wizard: simply select Post Function in the Trigger Type field and click on the “Configure Workflow” hyperlink marked in the picture below:
You will not be able to add the trigger from the SI Wizard though as it requires workflow modification.
Please note that if you do not have the necessary permissions, you will see the following message when you click on the link:
Post function trigger executions
As all other executions, the Post Function Trigger executions can be found in:
Each Issue created by Post Function Triggered SI will automatically have a comment stating how it was created and linking the issue which transition has triggered it’s creation:
One other thing that is important to mention is that if the “Stop workflow transition if a Scheduled Issue execution fails” option is selected and your SI fails, there will be no trace of it in the Execution history.
Behaviour for different SI statuses:
This feature works for the following Scheduled Issues:
Active
Expired
with no triggers set
It does not work for Scheduled Issues that are:
INvalid
Inactive
Feel free to tell us what topic should be covered: thescheduler@psc-software.atlassian.net