Skip to content

Add missing arguments to issues bulk update mutation

What does this MR do and why?

Adds missing attributes necessary for the issue bulk update view and the group and project level

  • state_event
  • add_label_ids
  • remove_label_ids
  • subscription_event
  • epic_id
  • health_status

Restrict group_bulk_edit to EE and check license

IssuesBulkUpdate mutation should only accept a project parent_id in FOSS, but can also accept a Group parent_id in EE.

In EE we also need to check if the group has the group_bulk_edit feature available

How to set up and validate locally

  1. Enable the bulk_update_issues_mutation feature flag in the Rails console Feature.enable(:bulk_update_issues_mutation)
  2. Run a GraphQL query like:
mutation {
  issuesBulkUpdate(
    input: {
      parentId: "gid://gitlab/Project/6",
      ids: ["gid://gitlab/Issue/685", "gid://gitlab/Issue/46"],
      addLabelIds: ["gid://gitlab/ProjectLabel/110", "gid://gitlab/ProjectLabel/124"],
      removeLabelIds: [],
      subscriptionEvent: SUBSCRIBE,
      healthStatus: needsAttention,
      epicId: "gid://gitlab/Epic/41"
    }
  ) {
    errors
    updatedIssueCount
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #327247 (closed)

Edited by Mario Celi

Merge request reports

Loading