It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to send automatic alert mail to users who are not logged into jira from past 30days? Edited

Hi,

We want to deactivate the users who are not logged into jira from past 30 days. Before deactivating them, we want send an alert mail. 

Can anyone help me how to automate this?

Thanks

2 answers

1 vote
Jack Community Leader Jan 03, 2020

There isn’t a way to automate this at least OOTB. What I have done is to create an excel template, export the users, drop them into my template and then filter on the ‘haven’t logged in since’. Copy the users and drop into an email.

@Jack 

Can't we automate by using scriptrunner also?

Jack Community Leader Jan 03, 2020

very possible. I haven't use the addon for some time so I can't try it out. Have you use the search bar above to see if others have solved this previously?

0 votes
Payne Community Leader Jan 03, 2020

I don't know of a way to accomplish this within Jira, but if you have database access, you can run the following query to identify such users:

SELECT display_name,email_address,FROM_UNIXTIME(left(attribute_value,char_length(attribute_value)-3)) AS 'last_successful_login'
FROM jira.cwd_user
LEFT JOIN jira.cwd_user_attributes on jira.cwd_user.ID = jira.cwd_user_attributes.user_id AND attribute_name = 'login.lastLoginMillis'
WHERE active = 1
HAVING last_successful_login < now() - interval 30 day
ORDER BY attribute_value DESC

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Events near you