Hi,
Can I have an Oracle query for getting all Jira licensed users and their last login date, including those who didn't login at all?
Thanks!
Orit.
@Orit Nachshon
Hi Orit
have a look to
https://confluence.atlassian.com/jirakb/retrieve-last-login-dates-for-users-from-the-database-363364638.html
Cheers
Kurt
Thanks Kurt!
My DBA tried this query from the article and getting an error. Any idea?
SELECT d.directory_name,
u.user_name,
TO_DATE('19700101','yyyymmdd') + ((attribute_value/1000)/24/60/60) as last_login_date
FROM cwd_user u
JOIN (
SELECT DISTINCT child_name
FROM cwd_membership m
JOIN licenserolesgroup gp ON m.parent_name = gp.GROUP_ID
) AS m ON m.child_name = u.user_name
SELECT *
FROM cwd_user_attributes ca
WHERE attribute_name = 'login.lastLoginMillis'
) a ON a.user_id = u.ID
JOIN cwd_directory d ON u.directory_id = d.ID
order by last_login_date desc;
*
ERROR at line 9:
ORA-00905: missing keyword
The last line contains a
that should not been there, can you pls. check
Hi Everyone,
I want to share my plugin with you. It will definetly help you filter out the inactive/active or never logged in users.
https://marketplace.atlassian.com/apps/1220581/my-user-manager-for-jira?hosting=server
It is for free Enjoy it
Kind Regards
Yassin
Thanks, it is a nice start! Could you please make the tables sortable?
Whether it support Jira Software? I just installed this plugin and restarted my Jira instance, but still I didn't see any option under user managment.
Please ignore my question. I was checking it on wrong place. I figured it out.
try this one:
select u.user_name, u.created_date, u.display_name, u.email_address,to_char(to_date('01.01.1970','dd.mm.yyyy') + to_number(a.attribute_value)/1000/60/60/24, 'yyyy-mm-dd') as last_loginFROM cwd_user u, cwd_user_attributes aWHERE u.id = a.user_idAND a.attribute_name ='login.lastLoginMillis'and u.DIRECTORY_ID=3and u.active=1and to_char(to_date('1970-01-01 00','yyyy-mm-dd hh24') + to_number(a.attribute_value)/1000/60/60/24 , 'YYYY')<2019order by last_login;
hi, is todate supported in SQL?, shouldnt we use cast ? or convert?
It looks like you're new here. Sign in or register to get started.