Adding a post function to transitions

Transitions, by default, are created with several post functions. These post functions provide key services to Jira's internal operations, so they cannot be deleted from the transition. These post functions perform the following:

  • Set the issue status to the linked status of the destination workflow step
  • Add a comment to an issue if one is entered during a transition
  • Update the change history for an issue and store the issue in the database
  • Re-index an issue to keep indexes in sync with the database
  • Fire an event that can be processed by the listeners

As you can see, these post functions provide some of the basic functions such as updating a search index and setting an issue's status after transition execution, which are essential in Jira. Therefore, instead of users having to manually add them in and risk the possibility of leaving one or more out, Jira adds them for you automatically when you create a new transition.

Post functions take place after a transition has successfully executed.

Perform the following steps to add a post function to a transition:

  1. Select the transition you want to add post functions to.
  2. Click on the Post Functions link.
  3. Click on the Add post function link and select the post function you want to add.
  4. Click on the Add button to add the post function.
  5. Depending on the post function, you may be presented with the Add Parameters To Function page, where you can specify configuration options for the post function. The following screenshot shows an example from the Update Issue Field post function:

Just like conditions and validators, multiple post functions form a post function group in a transition. After a transition is executed, each post function in the group is executed sequentially as it appears in the list, from top to bottom. If any post function in the group encounters an error during processing, you will receive an error, and the remaining post functions will not be executed.

Since post functions are executed sequentially and some of them possess the abilities to modify values and perform other tasks, often, their sequence of execution becomes very important. For example, if you have a post function that changes the issue's assignee to the current user and another post function that updates an issue field's value with the issue's assignee, obviously the update assignee post function needs to occur first, so you need to make sure it is above the other post function.

You can move the positions of post functions up and down along the list by clicking on the Move Up and Move Down links. Note that not all post functions can be repositioned.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset