Change sort order of packages and packageFiles
What does this MR do and why?
Change sort order for packages and packageFiles so the corpus row shows the correct details. We want to show the data for the latest corpus. Notice that the ID is larger after the fix.
Note: the first
is returning the latest package, since it seems to be the default sort order from backend
Fixes #351632 (closed)
Expected
Actual
How to set up and validate locally
- From the gitlab repo open a rails console and enable the
:corpus_management
AND:corpus_management_ui
feature flag
bundle exec rails c
then
[4] pry(main)> Feature.enable(:corpus_management)
[4] pry(main)> Feature.enable(:corpus_management_ui)
Navigate to as a maintainer:
http://172.16.123.1:3000/<group>/<project>/-/security/configuration/corpus_management
Demo
Fix
In ee/app/assets/javascripts/security_configuration/corpus_management/graphql/queries/get_corpuses.query.graphql
Change last
to first
packageFiles(last: 1) {
nodes {
...
}
}
pipelines(last: 1) {
nodes {
...
}
packageFiles(first: 1) {
nodes {
...
}
}
pipelines(first: 1) {
nodes {
...
}
}
Edited by -