Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3285

Profile javascript errors for users with numeric usernames starting with zero

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 2.3.1, 2.4.0
    • 1.0
    • None
    • None

      In screens that show a list of groups that a particular user is a member of, some users will see error popups or the groups simply won't load.

      This is due to some JS that stores the username as an HTML attribute "data-user" and the way jQuery reads these.

      We use $el.data('user'), which for most users returns something like "aahmed". For usernames that are all numbers, like 1234, this returns a number 1234. When the number starts with 0, the 0 is stripped.

      Thus when we use that value anywhere, it's incorrect.

      We should instead use $el.attr('data-user')

              aahmed Adam Ahmed (Inactive)
              aahmed Adam Ahmed (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: