Add Active/Archived button group in work item types list
What does this MR do and why?
This change adds the ability to view archived work item types separately from active ones. The interface now includes toggle buttons (Active/Archived) that appear when there are archived types, allowing users to switch between viewing active types and archived types. When viewing archived types, the page shows a different title and description explaining that archived types are disabled, and the "New type" button is hidden since you can't create new archived types. The filtering logic ensures only the appropriate types are displayed based on the selected view, and the count updates accordingly.
References
Screenshots or screen recordings
| No archived types | Active | Archived |
|---|---|---|
![]() |
![]() |
![]() |
How to set up and validate locally
-
Enable the
work_item_configurable_typesFF -
Go to group settings/admin work item settings
-
See that are are not able to see any active/archive toggle button as of now
-
Apply the following patch
diff --git a/app/assets/javascripts/work_items/components/work_item_types_list.vue b/app/assets/javascripts/work_items/components/work_item_types_list.vue index ef9f783ccf7e..ffb7e6d4be2c 100644 --- a/app/assets/javascripts/work_items/components/work_item_types_list.vue +++ b/app/assets/javascripts/work_items/components/work_item_types_list.vue @@ -95,7 +95,7 @@ export default { return this.config?.workItemTypeSettingsPermissions?.includes('archive'); }, hasArchivedTypes() { - return this.workItemTypes?.some((type) => type.archived); + return true; }, filteredWorkItemTypes() { if (!this.workItemTypes) {- See that you are able to see the toggle
- New type view not visible in archive view
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #585627 (closed)


