How to implement a "transition" in a workflow with parallel multi-person approval

Roronoa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2024

Hello,

I have customized two multi-user fields: "Approvers" and "Approved". There are multiple users in the "Approvers" field, and I want each of them to conduct an approval. Once a user completes their approval, they should be moved to the "Approved" field. When all users have completed their approvals, the workflow should automatically transition to the next state. Do I have to use the "ScriptRunner" plugin to achieve this function? Is there any other solution. If possible, could you please provide a script using "ScriptRunner" to achieve this functionality?

 

Thanks.

2 answers

2 accepted

0 votes
Answer accepted
Marcelo Ulloa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2024

Hi,

Instead of scripting everything from scratch, you can take advantage of Jira's built-in workflow approval features. You can configure the workflow so that all users in the "Approvers" field must approve before the transition to the next state happens. This simplifies the process and ensures that all required approvals are met before the workflow advances.

ScriptRunner can complement this setup by dynamically assigning users to the "Approvers" field. For example, you could use a custom field (e.g., custom field 12345 in your portal) where users specify the individuals who need to approve. ScriptRunner can then dynamically retrieve those users and set them as the approvers in the workflow.

This way, you have two options:

  1. Manual Configuration: Users enter approvers in a field, and the workflow proceeds when all have approved.
  2. Dynamic Assignment: ScriptRunner assigns approvers based on specific criteria or information from another field, making the process flexible and automated.

I believe this approach offers a simpler and more efficient solution than creating a custom script for the entire approval process.

Let me know if you'd like more details on setting this up!

0 votes
Answer accepted
Mickaël Orsolino
Contributor
October 11, 2024

Hi Roronoa,

Do you use Jira service management? There is a dedicated feature who do exactly that on a Jira service management project. If not you will have to do specific postfunction.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events