Scriptrunner login to control workflow

Saira
Contributor
September 11, 2022

Hi,

I have a use case where I need to allow transition to the next status to be done by members of a group - but also have groups control who can transition. 

So for instance,

If component = A

and

logged in user is member of group ABC

Then allow transition

Similarly, 

If component = B

and

logged in user is member of group XYZ

Then allow transition

1 answer

0 votes
Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 11, 2022

@Saira ,

 

You need to write scripted condition where you can check the group of logged in user and the component.

If (component ==  A && User Group == ABC) return true 

elseIf(component ==  B && User Group == XYZ)  return true

else return false.

 

This API helps you to get user groups -

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get

Saira
Contributor
September 11, 2022

yes, I need a more explicit example, I already know the steps, need scriptrunner code examples. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events