Help with Post Function

Robert.Kissinger March 31, 2021

When a resolved ticket is reopened, I would like a post function to do the following:

1. Check if the user in which the ticket is assigned is deactivated.

2. If the user is deactivated, change the ticket status to reopened and unassign the ticket from the user.

I am new to my position and inherited this project. Any help would be greatly appreciated to get me on the right path.

Thank you!

2 answers

2 votes
Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 31, 2021

@Robert.Kissinger You could set up an automation rule as follows:

active users.png

The first condition here checks that the resolution has been cleared (I haven't tested this one out, so if it doesn't work then you could always remove it, and use the Issue Transitioned trigger from Done --> In Progress, or whatever transition is clearing the resolution.

The second condition checks if the user is active or not - I see from this doc that you can use 'active' in a user smart value to check if the account is active or not - I tested this out with 'true' and 'false' as values to compare to and this seemed to work okay.

You'd then set the action to transition the task, and select the Assignee from the dropdown field and make sure this is set to Unassigned.

Hope this helps!

1 vote
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 31, 2021

Hi Robert - Welcome to the Atlassian Community!

To be honest, I don't know how to check if a user in a field is inactive or not from within the application. And certainly not without an add-on. Maybe JMWE or ScriptRunner could do that. 

I don't know what turnover is like with your organization, but I wouldn't think that it should happen that the user is inactive all that much. But a quick solution might be to re-open the issue and have automation send you an email that the card was reopened. The email could include the assignee name so you could quickly see if there needed to be a change or not (assuming you know your users and if they are active or not - otherwise, you would need to open the card to see). 

Maybe somebody has a better option here. 

Suggest an answer

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

Atlassian Community Events