Skip to content
Snippets Groups Projects
Commit 62ab71b9 authored by Jarka Košanová's avatar Jarka Košanová :three:
Browse files

Merge branch '440430-jira-multiple-project-keys-ff-and-frontend' into 'master'

parents 6ffc5ab5 1d02ad68
No related branches found
No related tags found
1 merge request!146087Add Jira project keys field behind feature flag
Pipeline #1196188237 failed
......@@ -15,7 +15,6 @@ import {
} from '~/integrations/constants';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import csrf from '~/lib/utils/csrf';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { testIntegrationSettings } from '../api';
import ActiveCheckbox from './active_checkbox.vue';
import DynamicField from './dynamic_field.vue';
......@@ -39,7 +38,6 @@ export default {
directives: {
SafeHtml,
},
mixins: [glFeatureFlagsMixin()],
inject: {
helpHtml: {
default: '',
......
......@@ -3,6 +3,7 @@ import { GlFormGroup, GlFormCheckbox, GlFormInput } from '@gitlab/ui';
// eslint-disable-next-line no-restricted-imports
import { mapGetters } from 'vuex';
import { s__, __ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
export default {
name: 'JiraIssuesFields',
......@@ -13,6 +14,7 @@ export default {
JiraIssueCreationVulnerabilities: () =>
import('ee_component/integrations/edit/components/jira_issue_creation_vulnerabilities.vue'),
},
mixins: [glFeatureFlagsMixin()],
props: {
showJiraIssuesIntegration: {
type: Boolean,
......@@ -54,13 +56,20 @@ export default {
return {
enableJiraIssues: this.initialEnableJiraIssues,
projectKey: this.initialProjectKey,
projectKeys: null,
};
},
computed: {
...mapGetters(['isInheriting']),
multipleProjectKeys() {
return this.glFeatures.jiraMultipleProjectKeys;
},
checkboxDisabled() {
return !this.showJiraIssuesIntegration || this.isInheriting;
},
validProjectKey() {
return !this.enableJiraIssues || Boolean(this.projectKey) || !this.isValidated;
},
......@@ -95,6 +104,21 @@ export default {
</gl-form-checkbox>
<div v-if="enableJiraIssues" class="gl-pl-6 gl-mt-3">
<gl-form-group
v-if="multipleProjectKeys"
:label="s__('JiraService|Jira project keys')"
label-for="service_project_keys"
class="gl-max-w-26"
>
<gl-form-input
id="service_project_keys"
v-model="projectKeys"
name="service[project_keys]"
:placeholder="s__('JiraService|For example, AB,CD')"
:readonly="isInheriting"
/>
</gl-form-group>
<gl-form-group
:label="$options.i18n.projectKeyLabel"
label-for="service_project_key"
......
......@@ -6,6 +6,9 @@ class IntegrationsController < Groups::ApplicationController
include ::Integrations::Actions
before_action :authorize_admin_group!
before_action only: [:edit] do
push_frontend_feature_flag(:jira_multiple_project_keys, group)
end
feature_category :integrations
......
......@@ -12,6 +12,9 @@ class IntegrationsController < Projects::ApplicationController
before_action :default_integration, only: [:edit, :update]
before_action :web_hook_logs, only: [:edit, :update]
before_action -> { check_test_rate_limit! }, only: :test
before_action only: [:edit] do
push_frontend_feature_flag(:jira_multiple_project_keys, project.group)
end
respond_to :html
......
---
name: jira_multiple_project_keys
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/440430
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/146087
rollout_issue_url:
milestone: '16.10'
group: group::import and integrate
type: wip
default_enabled: false
......@@ -28067,6 +28067,9 @@ msgstr ""
msgid "JiraService|For example, AB"
msgstr ""
 
msgid "JiraService|For example, AB,CD"
msgstr ""
msgid "JiraService|IDs must be a list of numbers that can be split with , or ;"
msgstr ""
 
......@@ -28106,6 +28109,9 @@ msgstr ""
msgid "JiraService|Jira project key"
msgstr ""
 
msgid "JiraService|Jira project keys"
msgstr ""
msgid "JiraService|Leave blank to use your current configuration"
msgstr ""
 
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment