Remove hardcoded Epic type check in create_work_item.vue (type select dropdown)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
1. showParentAttribute
showParentAttribute() {
// We use the work item create work flow for incidents although
// incidents haven't been migrated to work items and use the legacy
// detail view instead. Since the legacy view doesn't support setting a parent
// we need to hide this attribute here until the migration has been finished.
// if (this.selectedWorkItemTypeName === WORK_ITEM_TYPE_NAME_INCIDENT) { return false; }
// Hide Parent widget on Epic or Issue creation according to license permissions if ( this.selectedWorkItemTypeName === WORK_ITEM_TYPE_NAME_ISSUE || this.selectedWorkItemTypeName === WORK_ITEM_TYPE_NAME_EPIC ) { if (!this.validateAllowedParentTypes(this.selectedWorkItemTypeName).length) return false; }
return Boolean(this.workItemHierarchy); },
Purpose: Controls whether the Parent widget is shown during work item creation. Contains three hardcoded checks:
- Incident check (Line 443): Hides parent widget for Incidents because they haven't been fully migrated to work items
- Issue/Epic check (Lines 448-451): Hides parent widget for Issues and Epics if they don't have allowed parent types (license-based)
Impact: Hardcodes special behavior for three specific types (Incident, Issue, Epic) instead of using type-based configuration.
2. shouldDatesRollup
shouldDatesRollup
shouldDatesRollup() { return this.selectedWorkItemTypeName === WORK_ITEM_TYPE_NAME_EPIC; },
Purpose: Determines whether dates should roll up from child items. Only Epics have date rollup enabled.
Impact: Hardcodes date rollup behavior exclusively for Epics, preventing other work item types from having this feature.
Proposal
- useLegacyView to hide parent widget for incidents
- rollUp in dates widget definition
Edited by Deepika Guliani