Skip to content

BE: Add type field to UserCore

Oiza Baiye requested to merge 505554-be-add-type-field-to-usercore into master

What does this MR do and why?

Background: The user contribution mapping epic introduced placeholder user mapping in the direct transfer process. That is, when a group is imported existing user contributions on issues, MRs, etc. are automatically assigned to placeholder users, after which the user triggering the transfer will map existing users to their matching placeholder user. In the recent bug, these placeholder user is appearing in dropdowns. The frontend needs to filter out users that are placeholder 'bot' users from actual users when assigning an owner to an issue, etc.

The current MR adds a type field to the User type in the graphql schema, whose value will be one of possible enum values already defined here.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-11-28_at_7.53.51_PM Screenshot_2024-11-28_at_7.52.57_PM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. In rails console enable the experiment fully

    Feature.enable(:bulk_import_importer_user_mapping)
  2. Visit graphiql (GDK should be running) http://127.0.0.1:3000/-/graphql-explorer

  3. Query the user endpoint:

    query { user(username: "root") { type } }

Related to #505554 (closed)

Edited by Oiza Baiye

Merge request reports

Loading