The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Sachin Dhamale
Community Champion
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. 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events