Can I Get the Group of the assignee of a specific Issue?

Jawad Zakhour November 30, 2020

Hello,
I'm hitting this api to get all issues for those 3 groups: HR, DEV and Engineering.

https://test.atlassian.net/rest/api/2/search

"jql":"(assignee in membersOf('HR') OR assignee in membersOf('DEV') OR assignee in membersOf('Engineering')) AND created >= 2020-11-26 AND created < 2020-11-27 OR updated >= 2020-11-26 AND updated < 2020-11-27 ORDER BY created DESC".

But in the responce i can't get the Group of witch the assignee is in.
for example I want to know that the assigned member of this issue is in DEV for example.

But this field does not seem to be present.

should i add something to the expand field  "expand":["changelog"] ?

 

Thank you.

2 answers

2 accepted

0 votes
Answer accepted
Ravi Sagar _Sparxsys_
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 30, 2020

Hi @Jawad Zakhour 

As @Nic Brough -Adaptavist- mentioned above you need to make another call to get that information in your code.

Try this end point.

/rest/api/3/user?accountId=ACCOUNTID&expand=groups

Here is the curl command to test it quickly.

curl -i -X GET \
-H "Authorization:Basic ACCESSTOKEN" \
'https://JIRAURL/rest/api/3/user?accountId=ACCOUNTID&expand=groups' 

Just replace the ACCESSTOKEN, JIRAURL and the ACCOUNTID.

I hope it helps.

Ravi

Jawad Zakhour December 2, 2020

Thank you a lot

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2020

Group memberships of a user are not issue data.

You'll need to read the user and use another call to question the groups they belong to.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events