JIRA Integration does not transition issue from merge request
Summary
GitLab sees a JIRA issue as "Closed" when it hasn't actually closed the issue.
- Accept Merge Request that closes a JIRA issue (
Fixes EN-9
is in the MR description)- In the widget,
Closes EN-9
is specified.
- In the widget,
- After MR is accepted, we see the following:
The issue in JIRA is not transitioned. A link mentioning the merge commit is added:
develop
is the Default Branch specified in project settings.
I tested a manual POST to https://our_jira_instance/rest/api/2/issue/EN-9/transitions
with { "transition": { "id": 41 } }
specified in the JSON body, it successfully transitioned the issue:
I believe our JIRA Integration settings are correct:
Steps to reproduce
See: Summary
What is the current bug behavior?
- Accept MR that specifies a JIRA issue as Fixed
- GitLab adds a mention to MR commit in JIRA, and shows
Closed ###
in the MR widget. - Issue is not transitioned
What is the expected correct behavior?
- Accept MR that specifies a JIRA issue as Fixed
- GitLab adds a mention to MR commit in JIRA, and shows
Closed ###
in the MR widget. - Issue is transitioned correctly in JIRA
Relevant logs and/or screenshots
Looking through various GitLab logs and in atlassian-jira.log
, there are NO mentions of failure. It may be possible that JiraService::close_issue is not being called?
***!188 - Post merge finished on JID 32b19d0aa6be0d7947a5b420 with state merged
***!188 - Merge process finished on JID with state merged
Completed 200 OK in 249ms (Views: 186.8ms | ActiveRecord: 21.3ms)
Completed 200 OK in 515ms (Views: 5.0ms | ActiveRecord: 59.3ms)
JiraService SUCCESS: Successfully posted to https://our_jira_instance.
The SUCCESS here is likely the commit mention.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 7.11 Current User: git Using RVM: no Ruby Version: 2.3.7p456 Gem Version: 2.6.14 Bundler Version:1.13.7 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.16.4 Sidekiq Version:5.0.5 Go Version: unknownGitLab information Version: 10.8.4 Revision: 2268d0c Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://*** HTTP Clone URL: https://*** SSH Clone URL: git@***:some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 7.1.2 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...GitLab Shell version >= 7.1.2 ? ... OK (7.1.2) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 4/1 ... ok 7/2 ... ok 8/3 ... ok 2/4 ... ok 2/5 ... ok 12/6 ... ok 12/7 ... ok 4/9 ... ok 12/10 ... ok 12/11 ... ok 12/12 ... ok 12/13 ... ok 8/14 ... ok 4/15 ... ok 17/16 ... ok 24/18 ... ok 24/19 ... ok 7/20 ... ok 33/21 ... ok 3/23 ... ok 17/24 ... ok 34/25 ... ok 8/26 ... ok 17/28 ... ok 10/31 ... ok 2/32 ... ok 10/33 ... ok 8/34 ... ok 4/35 ... ok 4/36 ... ok 12/37 ... ok 10/38 ... ok 30/39 ... ok 2/41 ... ok 12/42 ... ok 4/44 ... ok 3/47 ... ok 17/48 ... ok 64/49 ... ok 17/50 ... ok 17/51 ... ok 4/52 ... ok 10/53 ... ok 17/54 ... ok 4/55 ... ok 61/57 ... repository is empty 4/58 ... ok 4/59 ... ok 4/60 ... ok 4/61 ... ok 4/62 ... repository is empty 10/63 ... ok 4/64 ... ok 12/65 ... repository is empty 14/66 ... ok 2/67 ... ok 12/68 ... ok 2/70 ... ok 2/71 ... ok 2/72 ... ok 2/73 ... ok 2/74 ... ok 17/77 ... ok 40/80 ... ok 10/81 ... ok 12/82 ... ok 12/83 ... ok 17/84 ... ok 7/86 ... ok 7/87 ... ok 7/88 ... ok 7/89 ... ok 45/90 ... ok 45/91 ... ok 45/92 ... ok 45/93 ... ok 7/94 ... ok 64/95 ... ok 17/96 ... ok 17/97 ... ok 3/98 ... ok 10/99 ... ok 10/100 ... ok 17/101 ... ok 10/103 ... ok 7/105 ... ok 2/106 ... ok 3/107 ... ok 10/108 ... ok 17/109 ... ok 17/110 ... ok 17/111 ... ok 17/112 ... ok 72/113 ... ok 23/114 ... ok 17/115 ... ok 7/116 ... ok 17/117 ... ok 7/119 ... ok 17/120 ... ok 10/122 ... ok 7/123 ... ok 10/124 ... ok 17/125 ... ok 10/126 ... ok 45/127 ... ok 75/128 ... ok 75/129 ... ok 75/130 ... ok 75/132 ... ok 76/133 ... ok 76/134 ... repository is empty 2/135 ... ok 7/136 ... ok 17/139 ... ok 72/140 ... ok 76/141 ... ok 79/142 ... repository is empty 10/143 ... ok 10/144 ... ok 17/145 ... ok 82/146 ... ok 82/147 ... ok 45/148 ... repository is empty 80/150 ... ok 79/151 ... ok 79/152 ... ok 80/154 ... ok 76/156 ... ok 76/157 ... ok 79/158 ... ok 10/159 ... ok 17/161 ... ok 7/162 ... ok 82/163 ... ok 84/165 ... ok 76/166 ... ok 17/167 ... ok 84/168 ... ok 82/169 ... ok 2/170 ... ok 80/171 ... ok 84/172 ... ok 17/173 ... ok 2/174 ... ok 17/175 ... ok 79/176 ... ok 79/177 ... repository is empty 85/180 ... ok 85/181 ... ok 85/182 ... repository is empty 85/183 ... ok 10/184 ... ok 2/185 ... ok 2/186 ... ok 84/187 ... ok 2/188 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) - snip -
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 4/1 ... yes 7/2 ... yes 8/3 ... yes 2/4 ... yes 2/5 ... yes 12/6 ... yes 12/7 ... yes 4/9 ... yes 12/10 ... yes 12/11 ... yes 12/12 ... yes 12/13 ... yes 8/14 ... yes 4/15 ... yes 17/16 ... yes 24/18 ... yes 24/19 ... yes 7/20 ... yes 33/21 ... yes 3/23 ... yes 17/24 ... yes 34/25 ... yes 8/26 ... yes 17/28 ... yes 10/31 ... yes 2/32 ... yes 10/33 ... yes 8/34 ... yes 4/35 ... yes 4/36 ... yes 12/37 ... yes 10/38 ... yes 30/39 ... yes 2/41 ... yes 12/42 ... yes 4/44 ... yes 3/47 ... yes 17/48 ... yes 64/49 ... yes 17/50 ... yes 17/51 ... yes 4/52 ... yes 10/53 ... yes 17/54 ... yes 4/55 ... yes 61/57 ... yes 4/58 ... yes 4/59 ... yes 4/60 ... yes 4/61 ... yes 4/62 ... yes 10/63 ... yes 4/64 ... yes 12/65 ... yes 14/66 ... yes 2/67 ... yes 12/68 ... yes 2/70 ... yes 2/71 ... yes 2/72 ... yes 2/73 ... yes 2/74 ... yes 17/77 ... yes 40/80 ... yes 10/81 ... yes 12/82 ... yes 12/83 ... yes 17/84 ... yes 7/86 ... yes 7/87 ... yes 7/88 ... yes 7/89 ... yes 45/90 ... yes 45/91 ... yes 45/92 ... yes 45/93 ... yes 7/94 ... yes 64/95 ... yes 17/96 ... yes 17/97 ... yes 3/98 ... yes 10/99 ... yes 10/100 ... yes 17/101 ... yes 10/103 ... yes 7/105 ... yes 2/106 ... yes 3/107 ... yes 10/108 ... yes 17/109 ... yes 17/110 ... yes 17/111 ... yes 17/112 ... yes 72/113 ... yes 23/114 ... yes 17/115 ... yes 7/116 ... yes 17/117 ... yes 7/119 ... yes 17/120 ... yes 10/122 ... yes 7/123 ... yes 10/124 ... yes 17/125 ... yes 10/126 ... yes 45/127 ... yes 75/128 ... yes 75/129 ... yes 75/130 ... yes 75/132 ... yes 76/133 ... yes 76/134 ... yes 2/135 ... yes 7/136 ... yes 17/139 ... yes 72/140 ... yes 76/141 ... yes 79/142 ... yes 10/143 ... yes 10/144 ... yes 17/145 ... yes 82/146 ... yes 82/147 ... yes 45/148 ... yes 80/150 ... yes 79/151 ... yes 79/152 ... yes 80/154 ... yes 76/156 ... yes 76/157 ... yes 79/158 ... yes 10/159 ... yes 17/161 ... yes 7/162 ... yes 82/163 ... yes 84/165 ... yes 76/166 ... yes 17/167 ... yes 84/168 ... yes 82/169 ... yes 2/170 ... yes 80/171 ... yes 84/172 ... yes 17/173 ... yes 2/174 ... yes 17/175 ... yes 79/176 ... yes 79/177 ... yes 85/180 ... yes 85/181 ... yes 85/182 ... yes 85/183 ... yes 10/184 ... yes 2/185 ... yes 2/186 ... yes 84/187 ... yes 2/188 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.7) Git version >= 2.9.5 ? ... yes (2.16.4) Git user has default SSH configuration? ... yes Active users: ... 26
Checking GitLab ... Finished
Possible fixes
Maybe related to gitlab-ce#29114.