[WIP] MBS-9253: Use type child_order rather than id to sort RGs #3387
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement MBS-9253
Description
This will allow us to list EP release groups above singles, which has been requested forever, and it makes sense in all markets except maybe Japan. Given Japan would want singles before albums, which we don't do anyway, this is probably not too relevant.
This changes the lists from sorting on type
id
to typechild_order
, which means reordering EP and single just requires switching theirchild_order
.For secondary types, we were sorting by type
id
on_fast
sorts and by type name on_slow
. This changes both to usechild_order
. Right now the secondary types all have achild_order
of0
, which we should probably change (either to match ID or name by default, before we take more active decisions about it).Tasks
artist_release_group
table whenrelease_group_primary_type
orrelease_group_secondary_type
get updated.artist_release_group
table if exists during the schema change.child_order
and checking if there's reordering in_fast
RG listings.child_order
values for secondary types (alphabetical keeps them sorted as in_slow
and RG edit forms, id-based keeps them sorted as in_fast
).Testing
Tested the slow method locally by using it by default for a moment (changing the condition for fast to
if ($self->has_materialized_artist_release_group_data && 0)
). Fast method is still untested, see tasks above.