How to get organization of a user in Script runner?

Ran Tian April 4, 2018

Hello, 

I'm having trouble get organization info from a user using script runner. Is there any suggestions?

1 answer

0 votes
Adrián Plaza [DEISER]
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.
April 4, 2018

Hi @Ran Tian,

 

You can use JIRA Service Desk API REST: https://docs.atlassian.com/jira-servicedesk/REST/3.11.1/#servicedeskapi/organization

 

Cheers,
Adrián.

Ran Tian April 7, 2018

Can you give the specific api that I should use?

As far as I checked, it can only get users in organization. But it cannot get organization info from a user. 

Adrián Plaza [DEISER]
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.
April 10, 2018

Hi @Ran Tian

 

This is not the most efficient way, but for example first you need to get all the organizations, then get all members of each organization and check if the user is in the current organization.

 

Cheers,

Adrián.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events