User mapping - Add fetching of importSourceUsers
What does this MR do and why?
- Add GraphQL query and fetching in app. Update existing code to match query response.
- Add pagination to table.
Here is the list of MRs around the feature:
MR | Status |
---|---|
Add basic PlaceholdersTabApp and feature flag |
|
Add placeholder users table |
|
Add placeholder actions with users select to table |
|
Add placeholder users table actions logic and validation |
|
Add fetching of importSourceUsers |
|
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
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Apply this diff to show the "Placeholders" tab:
diff --git a/app/assets/javascripts/members/components/members_tabs.vue b/app/assets/javascripts/members/components/members_tabs.vue
index 05fde6369d16..be4df313533a 100644
--- a/app/assets/javascripts/members/components/members_tabs.vue
+++ b/app/assets/javascripts/members/components/members_tabs.vue
@@ -27,6 +27,7 @@ export default {
...getters,
// eslint-disable-next-line @gitlab/require-i18n-strings
[`${memberType}Count`](state) {
+ if (memberType === 'placeholder') return 1;
return countComputed(state, memberType);
},
};
- Go to Group > Members and select the Placeholders tab. For example,
http://127.0.0.1:3000/groups/gitlab-org/-/group_members?tab=placeholders
. - You should see an empty table.
- To create a few dummy
Import::SourceUser
records:- Checkout the branch
seed-placeholder-users-task
. - Run this rake task
bin/rake gitlab:seed:placeholder_users\[22,50\]
, replacing22
with any group_id. (Note:50
is the number of users created) - Open a Rails console with
bin/rails console
and run this:
- Checkout the branch
s = Import::SourceUser.last
s.reassigned_by_user_id = 1
s.reassign_to_user_id = s.placeholder_user_id
s.status = 1
s.save
Related to #467371 (closed)
Edited by Justin Ho Tuan Duong