Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to retrieve the last login information of the user(s) using Jira Command Line Interface (CLI).

Instructions

Use getUser action to display the user statistics information, in general, using CLI action. 

To get the last login information for a

...

user:

  • Execute the below following action to display the specific user details using the parameter name. You can also see the userspecific user's latest login details. using the name parameter:

    Code Block
    themeMidnight
    --action getUser --name testmk


    Code Block
    themeMidnight
    Data for user 'testmk'
    
    User id . . . . . . . . . . . : testmk
    User key  . . . . . . . . . . : testmk
    Full name . . . . . . . . . . : testmk
    Email . . . . . . . . . . . . : testmk@gmail.com
    Time zone . . . . . . . . . . : Asia/Kolkata
    Avatar URL  . . . . . . . . . : https://www.gravatar.com/avatar/458e5180b6b320de17b8f4bc00?d=mm&s=48
    Active  . . . . . . . . . . . : Yes
    Groups  . . . . . . . . . . . : 
      Group . . . . . . . . . . . : Clay
      Group . . . . . . . . . . . : jira-administrators
      Group . . . . . . . . . . . : jira-servicedesk-users-1
      Group . . . . . . . . . . . : jira-software-users
      Group . . . . . . . . . . . : testmk_group
    Login information . . . . . . : 
      Last  . . . . . . . . . . . : 23/Apr/20 7:22 PM
      Previous  . . . . . . . . . : 23/Apr/20 7:22 PM
      Last failed . . . . . . . . : 10/Apr/20 4:46 PM
      Count . . . . . . . . . . . : 31
      Failed count  . . . . . . . : 0
      Total failed count  . . . . : 2


  • Execute the below following action to display the specific user details using parameter using userId. parameter:

    Code Block
    themeMidnight
    --action getUser --userId test2


To get the

...

latest login information

...

of all

...

users:

  • Use runFromUserList action to display the last Execute the following action to display the latest login information for of all the users .with the runFromUserList action:

    Code Block
    themeMidnight
    --action runFromUserList --name "@all" --common "-a getUser --userId @userId@"


To get the last login information for the current

...

user who is executing the

...

CLI action:

  • Executing Execute the below following action displays the current logged in user's information. You can also notice that the latest login details (current) are displayed.:

    Code Block
    themeMidnight
    --action getUser


    Code Block
    themeMidnight
    Data for user 'admin'
    
    User id . . . . . . . . . . . : admin
    User key  . . . . . . . . . . : admin
    Full name . . . . . . . . . . : admin
    Email . . . . . . . . . . . . : admin.1@gmail.com
    Time zone . . . . . . . . . . : Asia/Kolkata
    Avatar URL  . . . . . . . . . : https://www.gravatar.com/avatar/b65e44bc00?d=mm&s=48
    Active  . . . . . . . . . . . : Yes
    Groups  . . . . . . . . . . . : 
      Group . . . . . . . . . . . : jira-administrators
      Group . . . . . . . . . . . : jira-servicedesk-users
      Group . . . . . . . . . . . : jira-servicedesk-users-1
      Group . . . . . . . . . . . : jira-software-users
      Group . . . . . . . . . . . : jira-software-users-1
    Login information . . . . . . : 
      Last  . . . . . . . . . . . : 11/5/20 7:36 AM
      Last failed . . . . . . . . : 9/12/19 5:25 PM
      Count . . . . . . . . . . . : 2466
      Total failed count  . . . . : 1
    
    


The parameters used in the above actions are :

  • --name: Value defines the name of the user.
  • --userId: Value defines the user Id of the user.