how to find the users list who didn't login into JIRA for last 6 months
Either you need to query DB or use Java code
public Collection<ApplicationUser> getInactiveUsers(String startDate){ Collection<ApplicationUser> users = ComponentAccessor.getUserManager().getAllApplicationUsers(); Collection<ApplicationUser> inActiveUsers = new HashSet<ApplicationUser>(); try { //System.out.println(" ------- USER LAST LOGIN STARTS --------"); for (ApplicationUser u : users) { if (ComponentAccessor.getGroupManager().isUserInGroup(u.getName(), "jira-users")) { String stringDate = ComponentAccessor.getCrowdService().getUserWithAttributes(u.getName()).getValue("login.lastLoginMillis"); if(stringDate !=null ){ Long l1 = new Long(stringDate); Date lastLoginDate = new Date(l1); Date cutoffDate = (new SimpleDateFormat("yyyyMMdd")).parse(startDate); if (lastLoginDate.getTime() <= cutoffDate.getTime()) { inActiveUsers.add(u); }} } } }catch(Exception e){ e.printStackTrace(); } return inActiveUsers; }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.