Skip to content

Fix epic assignment in the createIssue mutation

Alex Kalderimis requested to merge 298840-ajk-fix-epic-id-processing into master

What does this MR do?

This fixes #298840 (closed), in which epic assignment in the createIssue mutation was found to be broken.

There were a couple of reasons here (incorrect use of global IDs for one), but the proximate cause was the change in the name of the method in the FOSS implementation of this mutation, which broke the EE override. An overrides annotation is added to make sure this does not happen again.

Example GraphQL queries

mutation createIssue(
  $projectPath: ID!
  $epicId: EpicID
  $title: String!
  $description: String
  $labels: [String!]
) {
  createIssue(
    input: {
      projectPath: $projectPath
      epicId: $epicId
      title: $title
      description: $description
      labels: $labels
    }
  ) {
    issue {
      webUrl
    }
  }
}

with variables like:

{
  "description": "Update alert's markup in app/views/admin/application_settings/integrations.html.haml",
  "epicId": "gid://gitlab/Epic/5213",
  "labels": ["frontend", "Pajamas", "component::alert", "pajamas:integrate"],
  "projectPath": "gitlab-org/gitlab",
  "title": "GlAlert > Update markup in app/views/admin/application_settings/integrations.html.haml"
}

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

This is a bug fix with new tests.

Related to #298840 (closed)

Edited by Alex Kalderimis

Merge request reports