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.
@Robert_Kissinger You could set up an automation rule as follows:
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!
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.
If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events