Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,360,196
Community Members
 
Community Events
168
Community Groups

Scriptrunner login to control workflow

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 Sep 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

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
Site Admin
TAGS

Atlassian Community Events