update user to project role using script is not working

Prashant Mali
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.
November 12, 2019

Hi Team,

we are using script post function on workflow transition in Jira. the use case is to add custom field users to the project role.

but sometimes it is failing. some users are automatically disappearing from the role. I don't know why.

 

Could you please help me proper script which can resolve above issue.

 

1 answer

0 votes
brbojorque
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2019

Hi @Prashant Mali ,

I would suggest to look in the Jira Server API.

Sample query would look 

POST - api/2/project/PRO/role/12321 - {"user" : "testuser"}

It is also important that the user already has access to Jira / Service Desk.

POST - api/2/group/user?groupname=jira-servicedesk-users - {"user" : "testuser"}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events