Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52161

[API token] Manage Legacy API Token usage UX date since use labeling should be restructured

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Jenkins 2.130

      User Id User full name Token name Days since creation
      # of use
      Days since last use Fresh token? Recent token?
      jenkins Jenkins Account Legacy Token 0 155 0 ✅ 
      hudson Hudson Account Legacy Token 0 0 0 ⚠️ ⚠️ 
      other Account Legacy Token 1 173 0 ⚠️ ✅ 

      I've sent a PR to address the easy part of the text.

      But, the Days column is really confusing, in part because there's no distinction between tokens that were created before migration and tokens created today (some day, potentially long..., after migration)

      For the case where there hasn't been a use, e.g., hudson above, the answer should be Unknown or something similar. For the case where the token was used today, e.g., jenkins above.

      As is, both of those cases appear as "0", but they are very different and should not be rendered in the same manner.

       

          [JENKINS-52161] [API token] Manage Legacy API Token usage UX date since use labeling should be restructured

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - wfollonier PTAL

          Wadeck Follonier added a comment - - edited

          jsoref could you please review the #3525 in core. I improve the detection of migration for legacy token, in which case we do not know the creation date and so I put a null instead of now.

          As the migration is done during the loading of User, we loose this information if this patch is not applied AND the user is saved. In which case, the legacy token will have a creation date and we will not be able to detect if it was created after the 2.129 or before.

          IOW it could interesting to backport it if the 2.129 is selected as LTS version, WDYT oleg_nenashev ?

          Wadeck Follonier added a comment - - edited jsoref could you please review the #3525 in core. I improve the detection of migration for legacy token, in which case we do not know the creation date and so I put a null instead of now . As the migration is done during the loading of User, we loose this information if this patch is not applied AND the user is saved. In which case, the legacy token will have a creation date and we will not be able to detect if it was created after the 2.129 or before. IOW it could interesting to backport it if the 2.129 is selected as LTS version, WDYT oleg_nenashev ?

          jsoref In order to ease a bit the management of the 3 sub-tasks, I have created

          • JENKINS-52182 for your first comment
          • JENKINS-52183 for the description part about the migration from "number of days" to "Today, yesterday, x days ago, x weeks ago, etc."

          If you want to edit your comment or remove it, and adding more information in the descriptions of the ticket, it could be nice

          Wadeck Follonier added a comment - jsoref In order to ease a bit the management of the 3 sub-tasks, I have created JENKINS-52182 for your first comment JENKINS-52183 for the description part about the migration from "number of days" to "Today, yesterday, x days ago, x weeks ago, etc." If you want to edit your comment or remove it, and adding more information in the descriptions of the ticket, it could be nice

          Josh Soref added a comment -

          I've deleted the "first comment". And removed the portions relating to relative days. That leaves this ticket focused on the portion that I believe your PR is addressing (which indeed is the most urgent from a data perspective).

          Josh Soref added a comment - I've deleted the "first comment". And removed the portions relating to relative days. That leaves this ticket focused on the portion that I believe your PR is addressing (which indeed is the most urgent from a data perspective).

            wfollonier Wadeck Follonier
            jsoref Josh Soref
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: