Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira API to fetch Reporter's Department

marianna.taborda April 16, 2024

Hello team!

i'm using a Jira automation to try and get the reporter's department in the company. This profile piece is added when they are granted a license to Atlassian - when joining the company. 

What I'm trying to get is a label in the ticket, or an update of the ticket organisations, or sth, so that I can then have other automations actioning the auto-rejection of these tickets. 

This is how I set up the automation:

Screenshot 2024-04-16 at 20.21.42.pngScreenshot 2024-04-16 at 20.22.29.png

 

But this threw an error:

 

Error publishing web request. Response HTTP status:

404
Error response HTTP body:
{"message":"null for uri: https://xxxxxxxx.atlassian.net/rest/servicedeskapi/department?accountId=5dc03d0b9833ce0dfd8xxxx","status-code":404}

Any idea how to troubleshoot this or how to get the reporter's team using API? ( I have tried a custom field and have the reporters use this field to give us their team, but the "bad-department" would simply pick a different team and call it a day. The issue is the team has such a high turnover that most training efforts prove unfruitful as the agents just keep on leaving the company or changing depts...)

 

Any input is highly appreciated here. Thank you!

1 answer

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2024

@marianna.taborda -

Please provide more details on how user's account entity attribute "Department" are populated?

Even though, I am not an expert with REST APIs, since user's account entity is considered as properties - I am sure that you are already knowing the following reference link - https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-properties/#api-group-user-properties

Lastly, here is the link on using SmartValue against User object in automation - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/

Hope this helps and sorry i don't have any recommendation at this time.  Please advise.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

 

 

Suggest an answer

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

Atlassian Community Events