Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-13089

Store user creation date, last update, last log date in the user table.

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • None
    • N/A
    • 3
    • 1
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      There's no way to build usage indicators with current user access information.

      • It would be very helpfull for security purpose, such as "remove access to users that does not access to jira since 90 days".
      • It would be very helpfull for reporting indicators, such as the number of new user per month.

            [JRASERVER-13089] Store user creation date, last update, last log date in the user table.

            Matt Doar added a comment -

            The field is already in the database

            mysql> desc cwd_user;
            +---------------------+---------------+------+-----+---------+-------+
            | Field               | Type          | Null | Key | Default | Extra |
            +---------------------+---------------+------+-----+---------+-------+
            | ID                  | decimal(18,0) | NO   | PRI | NULL    |       |
            | directory_id        | decimal(18,0) | YES  |     | NULL    |       |
            | user_name           | varchar(255)  | YES  |     | NULL    |       |
            | lower_user_name     | varchar(255)  | YES  | MUL | NULL    |       |
            | active              | decimal(9,0)  | YES  |     | NULL    |       |
            | created_date        | datetime      | YES  |     | NULL    |       |
            | updated_date        | datetime      | YES  |     | NULL    |       |
            | first_name          | varchar(255)  | YES  |     | NULL    |       |
            | lower_first_name    | varchar(255)  | YES  | MUL | NULL    |       |
            | last_name           | varchar(255)  | YES  |     | NULL    |       |
            | lower_last_name     | varchar(255)  | YES  | MUL | NULL    |       |
            | display_name        | varchar(255)  | YES  |     | NULL    |       |
            | lower_display_name  | varchar(255)  | YES  | MUL | NULL    |       |
            | email_address       | varchar(255)  | YES  |     | NULL    |       |
            | lower_email_address | varchar(255)  | YES  | MUL | NULL    |       |
            | CREDENTIAL          | varchar(255)  | YES  |     | NULL    |       |
            | deleted_externally  | decimal(9,0)  | YES  |     | NULL    |       |
            | EXTERNAL_ID         | varchar(255)  | YES  | MUL | NULL    |       |
            +---------------------+---------------+------+-----+---------+-------+
            18 rows in set (0.01 sec)
            
            

            Matt Doar added a comment - The field is already in the database mysql> desc cwd_user; +---------------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------------+---------------+------+-----+---------+-------+ | ID | decimal(18,0) | NO | PRI | NULL | | | directory_id | decimal(18,0) | YES | | NULL | | | user_name | varchar(255) | YES | | NULL | | | lower_user_name | varchar(255) | YES | MUL | NULL | | | active | decimal(9,0) | YES | | NULL | | | created_date | datetime | YES | | NULL | | | updated_date | datetime | YES | | NULL | | | first_name | varchar(255) | YES | | NULL | | | lower_first_name | varchar(255) | YES | MUL | NULL | | | last_name | varchar(255) | YES | | NULL | | | lower_last_name | varchar(255) | YES | MUL | NULL | | | display_name | varchar(255) | YES | | NULL | | | lower_display_name | varchar(255) | YES | MUL | NULL | | | email_address | varchar(255) | YES | | NULL | | | lower_email_address | varchar(255) | YES | MUL | NULL | | | CREDENTIAL | varchar(255) | YES | | NULL | | | deleted_externally | decimal(9,0) | YES | | NULL | | | EXTERNAL_ID | varchar(255) | YES | MUL | NULL | | +---------------------+---------------+------+-----+---------+-------+ 18 rows in set (0.01 sec)

            JH added a comment - - edited

            Hi,

            The creation date of user account is essential and easy to implement, I think it can be implemented by adding a column field in DB for that. Then we can use REST API or GUI to know the creation date and then we also can sort the users by creation date to find out the latest created user account.

            JH added a comment - - edited Hi, The creation date of user account is essential and easy to implement, I think it can be implemented by adding a column field in DB for that. Then we can use REST API or GUI to know the creation date and then we also can sort the users by creation date to find out the latest created user account.

            Matt Doar added a comment -

            Matt Doar added a comment - https://www.linkedin.com/pulse/long-term-jira-metrics-matt-doar/ may be useful if you have DB access

            Hi,

            While the DB queries are good suggestions, if one doesn't want to use the live production DB a REST API would be perfect.
            I tried the suggestion provided by Maxime Lemanissier as shown bellow, however it doesn't seem to work

            https://<localhost>/admin/rest/um/1/user?username=sxuvmp&expand=attributes

            Vasily Prokhorov added a comment - Hi, While the DB queries are good suggestions, if one doesn't want to use the live production DB a REST API would be perfect. I tried the suggestion provided by Maxime Lemanissier as shown bellow, however it doesn't seem to work https: //<localhost>/admin/ rest /um/1/user?username=sxuvmp&expand=attributes

            Yevhenii Kravchenko added a comment - - edited

            REALLY? 12 years is not enough for just adding `created_at` field? 

            Yevhenii Kravchenko added a comment - - edited REALLY? 12 years is not enough for just adding `created_at` field? 

            Hi All,

            Created date is available in datable user table

            Ramakrishna Anumalla added a comment - Hi All, Created date is available in datable user table

             

            url = "{}/admin/rest/um/1/user?username={}&expand=attributes".format(JIRA_BASE_URL, quote(user_name))
            

             
            returns a json representation of the user, with extended details. createdDate attribute contains the user creation date in epoch format

            Maxime Lemanissier added a comment -   url = "{}/admin/ rest /um/1/user?username={}&expand=attributes" .format(JIRA_BASE_URL, quote(user_name))   returns a json representation of the user, with extended details. createdDate attribute contains the user creation date in epoch format

            Kinda weird that this option doesn't exist. Please see this question for a real life situation where this might be needed.

            http://stackoverflow.com/questions/37176229/create-issue-validator-in-jira-that-would-prevent-spam-from-newly-registered-use/37184696#37184696

            Somaiah Kumbera added a comment - Kinda weird that this option doesn't exist. Please see this question for a real life situation where this might be needed. http://stackoverflow.com/questions/37176229/create-issue-validator-in-jira-that-would-prevent-spam-from-newly-registered-use/37184696#37184696

            Looks like there has been no activity in awhile, I am surprised to see this is still an issue. It would be nice to be able to query against account creation date. User accounts that were created 2 years ago and never utilized vs. a user account that was created yesterday and not yet utilized are two different things, it would be extremely helpful to be able to tell the difference for obvious reasons.

            Andrew Merriman added a comment - Looks like there has been no activity in awhile, I am surprised to see this is still an issue. It would be nice to be able to query against account creation date. User accounts that were created 2 years ago and never utilized vs. a user account that was created yesterday and not yet utilized are two different things, it would be extremely helpful to be able to tell the difference for obvious reasons.

            I would like to use Jira as a tool to support an helpdesk process, having as main ticket creation channel the emails sent by the user to a dedicated mailbox.

            Since many users are repeaters, I appreciate the feature in Jira that creates automatically a user account once a new user sends an email to the dedicated mailbox.

            Now the limit I see is that I don't find a way to manage these users, for example:
            -I would like to monitor the users created on a period of time (each day or each week) in order to do some basic user management like:
            -having some numbers
            -clean up the display name
            -manage user groups consequently
            -etc.

            therefore I hope this improvement will be implemented the soonest

            Damiano Migliori added a comment - I would like to use Jira as a tool to support an helpdesk process, having as main ticket creation channel the emails sent by the user to a dedicated mailbox. Since many users are repeaters, I appreciate the feature in Jira that creates automatically a user account once a new user sends an email to the dedicated mailbox. Now the limit I see is that I don't find a way to manage these users, for example: -I would like to monitor the users created on a period of time (each day or each week) in order to do some basic user management like: -having some numbers -clean up the display name -manage user groups consequently -etc. therefore I hope this improvement will be implemented the soonest

              Unassigned Unassigned
              4623d825f066 Ludovic Lambert
              Votes:
              91 Vote for this issue
              Watchers:
              39 Start watching this issue

                Created:
                Updated: