diff --git a/ee/app/assets/javascripts/groups/settings/work_items/create_custom_field.mutation.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_fields/create_custom_field.mutation.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/create_custom_field.mutation.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_fields/create_custom_field.mutation.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/custom_field_archive.mutation.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_fields/custom_field_archive.mutation.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/custom_field_archive.mutation.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_fields/custom_field_archive.mutation.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/custom_field_form.vue b/ee/app/assets/javascripts/groups/settings/work_items/custom_fields/custom_field_form.vue
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/custom_field_form.vue
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_fields/custom_field_form.vue
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/custom_field_unarchive.mutation.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_fields/custom_field_unarchive.mutation.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/custom_field_unarchive.mutation.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_fields/custom_field_unarchive.mutation.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/custom_fields_list.vue b/ee/app/assets/javascripts/groups/settings/work_items/custom_fields/custom_fields_list.vue
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/custom_fields_list.vue
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_fields/custom_fields_list.vue
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/group_custom_field.query.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_fields/group_custom_field.query.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/group_custom_field.query.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_fields/group_custom_field.query.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/group_custom_fields.query.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_fields/group_custom_fields.query.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/group_custom_fields.query.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_fields/group_custom_fields.query.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/group_work_item_types_for_select.query.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_fields/group_work_item_types_for_select.query.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/group_work_item_types_for_select.query.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_fields/group_work_item_types_for_select.query.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/update_custom_field.mutation.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_fields/update_custom_field.mutation.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/update_custom_field.mutation.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_fields/update_custom_field.mutation.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/custom_status/create_lifecycle_modal.vue b/ee/app/assets/javascripts/groups/settings/work_items/custom_status/create_lifecycle_modal.vue
new file mode 100644
index 0000000000000000000000000000000000000000..0f07dde175ef2c22375e3e47d50ae42c60912c4e
--- /dev/null
+++ b/ee/app/assets/javascripts/groups/settings/work_items/custom_status/create_lifecycle_modal.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+ {{ $options.i18n.createLifecycle }}
+
+
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/custom_status_settings.vue b/ee/app/assets/javascripts/groups/settings/work_items/custom_status/custom_status_settings.vue
similarity index 74%
rename from ee/app/assets/javascripts/groups/settings/work_items/custom_status_settings.vue
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_status/custom_status_settings.vue
index f77ad4b4feed3dd30eeb8f75512488c3f7c76d73..76a90073e4a45ed89cb692da77abfead1173e453 100644
--- a/ee/app/assets/javascripts/groups/settings/work_items/custom_status_settings.vue
+++ b/ee/app/assets/javascripts/groups/settings/work_items/custom_status/custom_status_settings.vue
@@ -2,13 +2,24 @@
import { GlAlert, GlButton, GlIcon } from '@gitlab/ui';
import { s__ } from '~/locale';
import * as Sentry from '~/sentry/sentry_browser_wrapper';
+import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import HelpPageLink from '~/vue_shared/components/help_page_link/help_page_link.vue';
import WorkItemStatusBadge from 'ee/work_items/components/shared/work_item_status_badge.vue';
import StatusModal from './status_modal.vue';
+import CreateLifecycleModal from './create_lifecycle_modal.vue';
import namespaceStatusesQuery from './namespace_lifecycles.query.graphql';
export default {
- components: { GlAlert, GlButton, GlIcon, StatusModal, WorkItemStatusBadge, HelpPageLink },
+ components: {
+ GlAlert,
+ GlButton,
+ GlIcon,
+ StatusModal,
+ WorkItemStatusBadge,
+ HelpPageLink,
+ CreateLifecycleModal,
+ },
+ mixins: [glFeatureFlagMixin()],
props: {
fullPath: {
type: String,
@@ -21,6 +32,7 @@ export default {
errorText: '',
errorDetail: '',
selectedLifecycleId: null,
+ showCreateLifecycleModal: false,
};
},
apollo: {
@@ -45,6 +57,9 @@ export default {
selectedLifecycle() {
return this.lifecycles.find((lifecycle) => lifecycle.id === this.selectedLifecycleId);
},
+ workItemStatusMvc2Enabled() {
+ return this.glFeatures.workItemStatusMvc2;
+ },
},
methods: {
dismissAlert() {
@@ -60,6 +75,9 @@ export default {
handleLifecycleUpdate() {
this.$apollo.queries.lifecycles.refetch();
},
+ toggleCreateLifecycleModal() {
+ this.showCreateLifecycleModal = !this.showCreateLifecycleModal;
+ },
},
};
@@ -98,6 +116,25 @@ export default {
+
+
+
{{ s__('WorkItem|Lifecycles') }}
+
+ {{
+ s__(
+ 'WorkItem|Lifecycles contain statuses that are used together as an item is worked on. Each item type uses a single lifecycle.',
+ )
+ }}
+
+
+ {{
+ s__('WorkItem|Create lifecycle')
+ }}
+
+
+
+
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/lifecycle_update.mutation.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_status/lifecycle_update.mutation.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/lifecycle_update.mutation.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_status/lifecycle_update.mutation.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/namespace_lifecycles.query.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_status/namespace_lifecycles.query.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/namespace_lifecycles.query.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_status/namespace_lifecycles.query.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/namespace_metadata.query.graphql b/ee/app/assets/javascripts/groups/settings/work_items/custom_status/namespace_metadata.query.graphql
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/namespace_metadata.query.graphql
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_status/namespace_metadata.query.graphql
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/status_form.vue b/ee/app/assets/javascripts/groups/settings/work_items/custom_status/status_form.vue
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/status_form.vue
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_status/status_form.vue
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/status_modal.vue b/ee/app/assets/javascripts/groups/settings/work_items/custom_status/status_modal.vue
similarity index 100%
rename from ee/app/assets/javascripts/groups/settings/work_items/status_modal.vue
rename to ee/app/assets/javascripts/groups/settings/work_items/custom_status/status_modal.vue
diff --git a/ee/app/assets/javascripts/groups/settings/work_items/work_item_settings.vue b/ee/app/assets/javascripts/groups/settings/work_items/work_item_settings.vue
index 855db1c2320f82a9a83dbdcf65ebbb893f95f8dc..b91bd8aeacf817b322f1a1bcc7792226d9d4cc67 100644
--- a/ee/app/assets/javascripts/groups/settings/work_items/work_item_settings.vue
+++ b/ee/app/assets/javascripts/groups/settings/work_items/work_item_settings.vue
@@ -1,7 +1,7 @@