Communication list for JIRA

Rahul Aich [Nagra]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2013

Hi All

We have thousands of users on our jira instance; many of them have left the organisation years ago. Therefore, for any outage or upgrade communication we need to exclude them

One way we have thought of doing so is to run a query on the database and extract a list of users who have logged in to the instance in the past 12 months, and send an email to them only.

Is anyone aware of any such script to get users logged in the last 12 months?

Rahul

2 answers

1 accepted

0 votes
Answer accepted
Bhushan Nagaraj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2013

SQL query

select u.display_name,u.email_address 
from jiraschema.cwd_user_attributes a
INNER JOIN jiraschema.cwd_user u 
ON u.id=a.user_id
WHERE
a.attribute_name = 'login.lastLoginMillis'
and a.attribute_value < 1337534822000

You can use the epochconverter link provided by Janet to get the millis value for any date.

2 votes
Janet Albion
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 19, 2013

Hi Rahul,

I have not known any existing script for this. But the following might help:

  • You might want to run a manual search on cwd_user_attributes: select user_id,lastAuthenticated from cwd_user_attributes where attribute_name='lastAuthenticated';
  • The time in the lastAuthenticated column is in Epoch time which you can convert using http://www.epochconverter.com/
  • the lastAuthenticated column is a varchar

Suggest an answer

Log in or Sign up to answer