From 9f46488805e86b1bc341ea1620b866016c2ce5ed Mon Sep 17 00:00:00 2001
From: GitLab Bot <gitlab-bot@gitlab.com>
Date: Wed, 20 May 2020 14:34:42 +0000
Subject: Add latest changes from gitlab-org/gitlab@13-0-stable-ee

---
 .../jira_import/components/jira_import_form.vue    | 23 +++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

(limited to 'app/assets/javascripts/jira_import/components/jira_import_form.vue')

diff --git a/app/assets/javascripts/jira_import/components/jira_import_form.vue b/app/assets/javascripts/jira_import/components/jira_import_form.vue
index 0146f564260..c2fe7b29c28 100644
--- a/app/assets/javascripts/jira_import/components/jira_import_form.vue
+++ b/app/assets/javascripts/jira_import/components/jira_import_form.vue
@@ -13,6 +13,10 @@ export default {
   currentUserAvatarUrl: gon.current_user_avatar_url,
   currentUsername: gon.current_username,
   props: {
+    importLabel: {
+      type: String,
+      required: true,
+    },
     issuesPath: {
       type: String,
       required: true,
@@ -21,21 +25,25 @@ export default {
       type: Array,
       required: true,
     },
+    value: {
+      type: String,
+      required: false,
+      default: undefined,
+    },
   },
   data() {
     return {
-      selectedOption: null,
       selectState: null,
     };
   },
   methods: {
     initiateJiraImport(event) {
       event.preventDefault();
-      if (!this.selectedOption) {
-        this.showValidationError();
-      } else {
+      if (this.value) {
         this.hideValidationError();
-        this.$emit('initiateJiraImport', this.selectedOption);
+        this.$emit('initiateJiraImport', this.value);
+      } else {
+        this.showValidationError();
       }
     },
     hideValidationError() {
@@ -62,10 +70,11 @@ export default {
       >
         <gl-form-select
           id="jira-project-select"
-          v-model="selectedOption"
           class="mb-2"
           :options="jiraProjects"
           :state="selectState"
+          :value="value"
+          @change="$emit('input', $event)"
         />
       </gl-form-group>
 
@@ -79,7 +88,7 @@ export default {
           id="jira-project-label"
           class="mb-2"
           background-color="#428BCA"
-          title="jira-import::KEY-1"
+          :title="importLabel"
           scoped
         />
       </gl-form-group>
-- 
cgit v1.2.1

