How to do something when a transition is being executed in BPS for Jira

Visitas: 14

 

In this tutorial, we will look at On Execute Events.

The ‘on execute’ event allows you to decide if the current users are able to execute the event. What you choose in an OnExecute event is the things that need to happen for the transition to be executed properly. We will add a Permission Validator event that checks to see if the user that is executing the transition has the permission to do so. In the following example, our user will need to have ‘Assign Issue’ permission to execute.

To add an on execute event, select a transition in the Workflow Designer.

Click on the Events tab in the Property Inspector.

 

When you drop down the OnExecute menu you will see a BPS Required Field Validator, this is a system event that cannot be removed. You can ignore it.

Click the + (plus sign) to the right of OnExecute to add an event.

From the popup menu, choose Add Event.

You will now see a pane open at the bottom of the screen that you can choose an event.

Choose ‘Permission Validator’ and click Add.

From the dropdown on Permissions, select ‘Assign Issues’.

Click Add.

As this event is in the OnExecute, all users will be able to see the transition, but you will now have a requirement that only those users that have the Assign Issues permission will be able to execute the transition.

To add more events you can click the plus sign to add more, or you can even add a code event to create your own with a Groovy script.

Thank you for following this tutorial, we hope you find this function very useful in your projects.

CAPTCHA
Esta pregunta es para comprobar si usted es un visitante humano y prevenir envíos de spam automatizado.