Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Get list of users sorted by last login or last activity date

I was hoping to see a "last login date" or similar in the list of users in the Fisheye admin panel, but I do not.

Is there a way to use the REST API to get such a a list? If not, what about a raw SQL query (I'm using postgres)?

I'm trying to delete old users from the system, i.e. former employees or employees that do not Fisheye often.

2 answers

1 accepted

2 votes
Answer accepted
Nick Atlassian Team Feb 02, 2014

If you have access to the postgress database in use by Crucible, the following:

 

select cru_user_name, to_timestamp( max(cru_last_viewed)/1000), count(cru_user_name) from cru_recently_visited group by cru_user_name order by max(cru_last_viewed) desc;

 

Should give you roughly what you need.

It wont give you logins per-se, however will let you know which users recently viewed an 'entity' in FishEye/Crucible. An entity is: a repository, a project, a review or a user page.

You could also consult the cru_login_cookie table to get the last time a login cookie was created for any given user.

 

 

 

 

Good advice, thanks. The postgres query gave me `ERROR: column "cru_recently_visited.cru_last_viewed" must appear in the GROUP BY clause or be used in an aggregate function`, so I removed the order by part and did the sorting in a script instead.

Hi,

I ran the query without the order part. Please could you interprete the results I have for me? What are the numerical figures and how do I use them to identify recent logins

1385416048262 | user1

1344284846104 | user2

Nick Atlassian Team Apr 10, 2014

Those numbers are Unix times: milliseconds since epoch.

0 votes

Hi,

 

The information about the last login can be retrieved by following the steps / running the query on the following article:

How to query for inactive/idle users in FishEye/ Crucible

 

This page covers both older and newer (4+) versions of Fisheye.

 

Cheers,

Caterina - Atlassian

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Share your Confluence Cloud experience for a chance to win $500!

Take our 5-minute survey to win a $500 Visa gift card! Are you currently using Confluence Cloud? We want to hear from you! Fill out this quick survey about your Confluence Cloud experience so we ...

153 views 1 8
Read article

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