Add GraphQL mutation to undo keep as placeholder

What does this MR do and why?

Add mutation to change import source user from keep_as_placeholder to pending_reassignment

References

#535431 (closed)

Screenshots or screen recordings

Before After

How to set up and validate locally

This MR just adds the mutation. To test, GraphQL Explorer needs to be used.

  1. Navigate to http://gdk.test:3000/-/graphql-explorer
  2. Pick a top-level group that has Import Source Users
  3. List all Import Source Users of the group
{
  namespace(fullPath: "gitlab-org") {
    importSourceUsers(statuses: [KEEP_AS_PLACEHOLDER, PENDING_REASSIGNMENT]) {
      nodes {
        id
        status
        sourceName
        placeholderUser {
          username
        }
        reassignedByUser {
          username
        }
        reassignToUser {
          username
        }
      }
    }
  }
}
  1. Pick the ID of an Import::SourceUser that has status: PENDING_REASSIGNMENT, and use a mutation to change the status to KEEP_AS_PLACEHOLDER
mutation {
  importSourceUserKeepAsPlaceholder(input: { id: "gid://gitlab/Import::SourceUser/12" }) {
    errors
    importSourceUser {
      id
      status
    }
  }
}
  1. Use the new mutation to change the status back to PENDING_REASSIGNMENT
  mutation {
  importSourceUserUndoKeepAsPlaceholder(input: { id: "gid://gitlab/Import::SourceUser/12" }) {
    errors
    importSourceUser {
      id
      status
    }
  }
}

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.

Edited by Rodrigo Tomonari

Merge request reports

Loading