How do i get a list of inactive users in Attlasian stash

IS there a way to list all the inactive users for the past X number of days ?

1 answer

This widget could not be displayed.

Hi Rahul,

You could try the following SQL query on your database. (I have tested it against Postgres)

select, max(sa.created_timestamp) from stash_user su
join sta_activity sa
on sa.user_id =
where not in (
select from sta_activity a 
join stash_user s
on a.user_id =
where a.created_timestamp > CURRENT_DATE - integer '30' 
order by desc
group by

It will give you a list of all "stash-users" i.e. users counting toward your license, that haven't any activity registered the last 30 days. It takes ALL activities into consideration. I haven't found out yet what the different activity_types represent so I look for them all in this query.

I tried this on my instance and it seems to work as expected. Please play around with it and let me know how it works for you!


// Svante

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

135 views 5 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you