Jira integration form on groups doesn't check license correctly
Summary
The Group level integration for Jira shows that “View Jira issues in GitLab” is a Premium feature although the group has a gold license:
Output of checks
This bug happens on GitLab.com
Possible fixes
From a discussion on Slack (internal): https://gitlab.slack.com/archives/CK4Q4709G/p1615548118169500
@toupeira: I can reproduce on staging, in a group with an Ultimate license. Looks like we only check the license on projects: https://gitlab.com/gitlab-org/gitlab/blob/cffdff1f1a579328b9d980bd6aeb2a7f000f8729/ee/app/helpers/ee/services_helper.rb#L18
@justin_ho: Yes as you mentioned some of the checks depend on a project. And from that I was able to pinpoint exactly what the issue is and when it happened. It’s with this commit 0c0dbb85 which removes some of feature flag checks.We actually did not allow setting up Jira issues on the group / instance level because some of the code still depends on a project (and that part of the integration makes most sense on the project level anyway).A quick fix for this would be to simply hide that section from the frontend:
diff --git a/app/assets/javascripts/integrations/edit/components/integration_form.vue b/app/assets/javascripts/integrations/edit/components/integration_form.vue index 9ca660ea3ae..91f7c7dabf6 100644 --- a/app/assets/javascripts/integrations/edit/components/integration_form.vue +++ b/app/assets/javascripts/integrations/edit/components/integration_form.vue @@ -126,7 +126,7 @@ export default { v-bind="field" /> <jira-issues-fields - v-if="isJira" + v-if="isJira && !isInstanceOrGroupLevel" :key="`${currentKey}-jira-issues-fields`" v-bind="propsSource.jiraIssuesProps" />
Of course the better long term fix would be to have that section of the form work for group / instance level which is to update the code Markus linked above.