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.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 9.12.5
    • DVCS Connector

    Description

      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. 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ad506bb12b8e Chandra Shekhar Pandey
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: