WorkItemDelete mutation needs to handle group level issues
The method https://gitlab.com/gitlab-org/gitlab/-/blob/6a0103a88babfc6ad4b3b1fb69011eaa537f5c7b/app/services/issuable/destroy_service.rb#L26 won't be able to handle group level work items and raise an error if called. We probably don't have a place where this service is being called with group level work items yet outside of the work items GraphQL API, but we certainly can do this with the WorkItemDelete
mutation. The mutation will also call the service with the wrong container in https://gitlab.com/gitlab-org/gitlab/-/blob/27e2cde7a2d8d02fae8a797eb671ab535ad7aab7/app/graphql/mutations/work_items/delete.rb#L23
Edited by Mario Celi