The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically Disable user based on data from custom field

Karen Waters
November 19, 2019

Hello there,

 

I am trying to achieve disabling of users based on dates which are entered in a custom field. This could be useful for temp staff who have a start and end date. Would like an automation to automatically deactivate the user once this time is up. I have looked at automation for jira doing this but not sure the property key can be updated by automation.

 

Any ideas would be appreciated.

 

Thank you

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Brant Schroeder
Community Champion
November 19, 2019

You can use scriptrunner to automatically disable and enable users.  They have an example here: https://library.adaptavist.com/entity/deactivate-idle-users?_ga=2.114642631.1582705835.1574107332-1726082589.1570807866  You would just need to change the logic to look at your custom field and not at last login.  You can then use scriptrunners scheduled jobs to run the script every night for instance or every hour.