Adding a post function to transitions

Transitions, by default, are created with several post functions. These post functions provide key services to Jira 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 is essential in Jira. Therefore, instead of letting users 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:

  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:
  1. Click on the Add button to add the post function.
  2. 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:

When a transition is executed, each post function is executed sequentially as it appears in the list, from top to bottom. If any post function in the list 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 ability 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 that it is above the other post function.

You can move the position 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, such as the re-index issue and fire issue event post functions. They are locked in their positions to ensure data integrity is maintained in Jira.

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

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