Prevent reserved names in custom wit
Issue: [BE] Throw error from backend when we try to ad... (#583832 - closed)
What does this MR do and why?
This change adds protection to prevent users from creating work item types with certain reserved names that could conflict with existing system functionality.
The code defines a list of 9 reserved names (like "vulnerability", "merge_request", "commit", etc.) that users cannot use when creating custom work item types. When someone tries to create a work item type with any of these names, the system will now show an error message saying the name is reserved and cannot be used.
Validation handles cases where the name uses uppercase/lowercase letters or spaces instead of underscores (so "Merge Request" and "VULNERABILITY" are also blocked). This prevents naming conflicts that could cause confusion.
References
Screenshots or screen recordings
| Reserved Names |
|---|
![]() |
![]() |
| System Defined Types |
|---|
![]() |
![]() |
How to set up and validate locally
- In rails console, enable the feature flag
Feature.enable(:work_item_configurable_types) - Test via GraphQL (GraphiQL at /-/graphql-explorer)
Create a custom work item type:
mutation {
workItemTypeCreate(input: {
fullPath: "your-group-path"
name: "merge request"
iconName: "bug"
}) {
workItemType {
id
name
iconName
}
errors
}
}Verify the response:
Error: Merge Request is reserved and cannot be used
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.



