GET issue, find issue assignee, check if assignee account is active

Hello there,

I’m trying to write a post-function for my workflow in Jira Service Desk.

I’d like Jira to automatically unassign tickets that are assigned to deactivated users when a ticket is reopened so that it can be assigned to an active member of the team.

The script should first send a GET call to the Jira Cloud platform REST API to retrieve the issue’s assignee’s account status.

Could someone please show me an example of above to point me on the right track, as I have inherited this task from a previous person who is no longer with us. I appreciate it so so much.

Hi Robert,
You’d probably want to use the Get User REST API - you supply the account ID and the response includes active status.
There are examples how to call the endpoint using various platforms on the page i linked as well.
Hope that helps.