GitLab-JIRA integration occasionally posts several JIRA comments for the same Git commit (related to merge requests?)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Hi!
From time to time we observe that GitLab-JIRA integration creates duplicated comments in JIRA tickets after a merge is performed through GitLab UI.
For example:
The commit tree is straightforward:
| * | 94ca043f02ffb054ac0239adf9cc3223888ead3c 2020-07-30 15:23:05 +0300 Evgeny Arshinov GRTP-2186: **********
| * | 918fdba6952711780e9ecfd9a7db4805b678e5d6 2020-07-30 14:39:45 +0300 Evgeny Arshinov GRTP-2186: **********
| | |
| | | * 652413963defee7c25d350fecce12cd408f71ff8 2020-07-30 02:43:29 -0700 ******** (origin/master) Merge branch 'dev' into 'master'
| | | |\
| | |_|/
| |/| |
| * | | e5908ff860d0757df50cb2c442179a6d4d6f93c2 2020-07-30 12:28:18 +0300 ************************************
| * | | 60bb355a1ceae349331348378e07019328a4c863 2020-07-29 22:33:06 +0300 Evgeny Arshinov *******************
| * | | 216d58035730511f09d907647031839868663f6d 2020-07-29 22:06:53 +0300 Evgeny Arshinov *******************
| * | | cb6f2dff7bef49f59bb0e4bff0cac543e2292571 2020-07-29 20:42:05 +0300 Evgeny Arshinov *******************
| * | | 6d266791aa375ae89763d77a379ba69ecba68a38 2020-07-29 19:39:42 +0300 Evgeny Arshinov GRTP-2186: Fix the condition that makes controls readonly when a collaborative action is in progress
| * | | dd571762e498de7691d0c7c0d26b1bbfc83c47ff 2020-07-29 19:33:28 +0300 Evgeny Arshinov GRTP-2186: ********
| * | | 377e466e1f901630b9e475abfccee0df630f5b73 2020-07-29 19:05:35 +0300 Evgeny Arshinov GRTP-2186: ********
| * | | 212ef64fc9bd805272e597b23d4c39005dd3f63a 2020-07-29 18:42:17 +0300 Evgeny Arshinov GRTP-2186: ********
What makes me blame merge requests is that the timestamp of the duplicated JIRA comment is close to the date of the merge commit (2020-07-30T12:43:31+0300 and 2020-07-30 02:43:29 -0700 respectively).
Merge request description does not have any references to the problematic commit. In fact, in this case the description is empty:
Nor there are any references in the merge commit message:
$ git show --pretty=full 65241396
commit 652413963defee7c25d350fecce12cd408f71ff8 (origin/master)
Merge: faa375522 e5908ff86
Author: ********
Commit: ********
Merge branch 'dev' into 'master'
Dev
See merge request grt/GRT!1046
Steps to reproduce
So far I was not able to reproduce this problem in a demo project :-(
To be fair, duplicates only appear from time to time and so far I couldn't deduce any pattern. Maybe you developers could provide some hints knowing how the integration works under the hood.
Example Project
No repro as of yet :-(
What is the current bug behavior?
Occasionally several JIRA comments are posted for the same Git commit.
What is the expected correct behavior?
There shouldn't be duplicated JIRA comments.
Relevant logs and/or screenshots
If some GitLab instance logs could be helpful, I could contact our GitLab admin to get them.
Results of GitLab environment info / GitLab application Check
I don't have admin access to GitLab.
What I know is that we are using GitLab Enterprise Edition 13.1.5-ee.
Possible fixes
There aren't any I could suggest.

