Manage achievement order on profile
What does this MR do and why?
Manage achievement order on profile
Changelog: added
Screenshots or screen recordings
No UI changes
How to set up and validate locally
Feature.enable(:achievements)
- Log in and have achievements
bin/rake db:seed_fu FILTER=36_achievements
- Get GIDs for
Achievements::UserAchievement
query { user(username: "root") { userAchievements { nodes { id achievement { name } priority } } } }
- Update the priority for some achievements
mutation { userAchievementPrioritiesUpdate(input: { userAchievementIds: ["gid://gitlab/Achievements::UserAchievement/<first user achievement id>", "gid://gitlab/Achievements::UserAchievement/<second user achievement id>"], }) { userAchievements { id priority } errors } }
- Execute the query from point 3 again and verify that the achievements are sorted by their
priority
property (smallest value first, nulls last)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #390389
Edited by Niklas van Schrick