Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-25857

Author for git events is not set correctly in Jira Dev Panel with DVCS Gitlab integration.

      Issue Summary

      • If there are user in gitlab which have an ambiguous name like following then which ever user is first in alphabetical order is reported as Author.
      xyz
      zxyz
      mxyz
      axyz
      • It seems that following gitlab API is being used to fetch these users in Jira. This fetch all users matching expression "xyz"
      <gitlab-url>/api/v4/users?search=<emailorusername> 
      • Instead following api should be used to get specific user information.
        <gitlab-url>/api/v4/users?username=xyz

      This is reproducible on Data Center: no

      Steps to Reproduce

      NA

      Expected Results

      Dev tool sidebar is showing the wrong user for actions taken in GitLab. Instead of showing actions done by user "xyz", the DVCS-Connector seems to show the first in alphabetical order containing that username, hence showing "axyz" as "actor". 

      Following API should be used instead to get correct user information.

      <gitlab-url>/api/v4/users?username=xyz 

      Actual Results

      The below exception is thrown in the xxxxxxx.log file:

       2024-02-16 16:35:04,746+0100 DVCSConnector.EventService:thread-1 WARN [c.a.j.p.d.spi.gitlab.GitLabCommunicator] Provided user identifier 'xyz' is ambiguous. Found [9] corresponding users: [[GitLabUser{avatarUrl='<someurl>/avatar.png', createdAt='null', email='null', id=3361476, name='Some1 xyz', state='active', username='xyz', webUrl='https://gitlab.com/xyz'}
      , GitLabUser{avatarUrl='<someurl>/avatar.png', createdAt='null', email='null', id=13688770, name='Some2 xyz', state='active', username='zxyz', webUrl='https://gitlab.com/zxyz'}
      , GitLabUser{avatarUrl='<someurl>/avatar.png', createdAt='null', email='null', id=2756994, name='Some3 xyz', state='active', username='mxyz', webUrl='https://gitlab.com/mxyz'}
      , GitLabUser{avatarUrl='<someurl>/avatar.png', createdAt='null', email='null', id=8255511, name='Some4 xyz', state='active', username='axyz', webUrl='https://gitlab.com/axyz'}
      ------

      Workaround

      Currently there is no known workaround for this behavior. 

          Form Name

            [JSWSERVER-25857] Author for git events is not set correctly in Jira Dev Panel with DVCS Gitlab integration.

            SET Analytics Bot made changes -
            Support reference count Original: 4 New: 5
            Marc Dacanay made changes -
            Labels New: ril
            Marc Dacanay made changes -
            Remote Link New: This issue links to "Internal ticket (Web Link)" [ 956807 ]
            SET Analytics Bot made changes -
            Support reference count Original: 3 New: 4
            SET Analytics Bot made changes -
            Support reference count Original: 2 New: 3
            Bugfix Automation Bot made changes -
            Introduced in Version Original: 9.12 New: 9.08
            Oleksandr Tkachenko made changes -
            Labels Original: FY24RRC
            Oleksandr Tkachenko made changes -
            Affects Version/s New: 9.8.0 [ 104611 ]
            SET Analytics Bot made changes -
            UIS New: 3
            SET Analytics Bot made changes -
            Support reference count Original: 1 New: 2

              Unassigned Unassigned
              ad506bb12b8e Chandra Shekhar Pandey
              Affected customers:
              6 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated: