Show custom work item types in Create work item form and types filter : Remove NAME_TO_TEXT_MAP from codebase

What does this MR do and why?

This change removes NAME_TO_TEXT_MAP and NAME_TO_TEXT_LOWERCASE_MAP i.e mapping constants that converted work item type names (like "Task", "Issue", "Epic") into different text formats for display purposes.

Previously, the code used these lookup tables to convert internal names into lowercase ("Task" → "task") or title-case versions for UI display. Now, the code directly uses the work item type names as returned by the backend, simplifying the codebase and eliminating 36+ usages of these mappings across components.

The changes affect creation forms, error messages, confirmation dialogs, state toggles, parent/child pickers, and various UI elements across both CE and EE.

References

Screenshots or screen recordings

There are many but tried to add the use cases below

How to set up and validate locally

Setup

Feature.enable(:work_item_configurable_types)

Navigate to a group with work items enabled, e.g. http://127.0.0.1:3000/groups/flightjs

1. Create work item form -> title and button text

Where: Any group/project → New issue (or work items list → New item)

  1. Open the Create work item modal or page for an Epic
  2. Verify the form title reads "New Epic" (not "New epic")
  3. Verify the submit button reads "Create Epic"
  4. Change the type to Key Result and verify the title updates to "New Key Result"

To see the new work item types, add some work item types in the group and go the the project to create a a new work item

diff --git a/app/assets/javascripts/work_items/components/create_work_item.vue b/app/assets/javascripts/work_items/components/create_work_item.vue
index 817d44365810..be8d49f58eba 100644
--- a/app/assets/javascripts/work_items/components/create_work_item.vue
+++ b/app/assets/javascripts/work_items/components/create_work_item.vue
@@ -289,7 +289,7 @@ export default {
       variables() {
         return {
           fullPath: this.inputNamespacePath,
-          onlyAvailable: true,
+          onlyAvailable: false,
         };
       },
       update(data) {
Screenshot 2026-03-11 at 3.30.21 PM.png Screenshot 2026-03-11 at 3.30.11 PM.png

2. Cancel confirmation modal

Where: Create work item form → make changes → click Cancel

  1. Open the create form for an Epic
  2. Type something in the name field
  3. Click Cancel
  4. Verify the confirmation modal reads: "Are you sure you want to cancel creating this Epic?"

3. Error messages -> create mutation failure

Where: Create work item form

  1. Open the create form
  2. Simulate a network error (e.g. disconnect network and submit)
  3. Verify the error alert reads: "Something went wrong when creating Epic. Please try again." (type name is title-cased)

4. Work item actions menu

Where: Any work item detail page → actions dropdown (⋮)

  1. Open a Task work item
  2. Open the actions dropdown
  3. Verify:
    • Delete option reads "Delete Task" (not "Delete task")
    • Delete confirmation (no children) reads: "Are you sure you want to delete the Task? This action cannot be reversed."
    • Delete confirmation (with children) reads: "Delete this Task and release all child items? This action cannot be reversed."
  4. Open an Issue work item
  5. Verify the copy email option reads: "Copy Issue email address"

5. Change type modal

Where: Work item detail → actions → Change type

  1. Open an Issue that has an Epic parent, with sub-epics disabled
  2. Open the change type modal
  3. Verify the warning reads: "Parent item type Epic is not supported on Issue. Remove the parent item to change type."
  4. Open an Issue that has child Task items
  5. Change type to Task
  6. Verify the warning reads: "Task does not support the Task child item types. Remove child items to change type."

6. Token input -> fetch error

Where: Any work item → Add child or Add related item token input

  1. Disconnect network or simulate query failure
  2. Open the child/related item token input for a Task
  3. Verify the error reads: "Something went wrong while fetching the Task. Please try again."

7. Note actions -> author badge tooltip

Where: Any work item comment → author badge

  1. Open a Task work item that you authored
  2. View the comments section
  3. Hover over the Author badge on your comment
  4. Verify the tooltip reads: "This user is the author of this Task."

8. State toggle

Where: Any work item detail page

  1. Open a work item (e.g. Issue)
  2. Toggle the state (Open → Closed or vice versa)
  3. Verify any error messages use the correct title-cased type name

Where: Create work item from a related item context

  1. From an Epic work item, create a related item
  2. Verify the checkbox reads: "Mark this item as related to: Epic #X"

10. Resolve thread -> create work item

Where: Merge request discussion → Resolve by creating a work item

  1. Open a merge request with an unresolved thread
  2. Click Resolve thread by creating an Issue
  3. Verify the info text reads: "Creating this Issue will resolve the thread in !X (discussion XXXX)"

11. Promote actions

Where: Key Result work item → actions → Promote to Objective

  1. Open a Key Result
  2. Simulate a promote mutation error
  3. Verify the error reads: "Something went wrong while promoting the Key Result. Please try again."
Edited by Deepika Guliani

Merge request reports

Loading
Loading