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.
Data in various collections is stored based on the map's "Map" value, which is derived from the filename. We can retrieve a mapping from the map file name to the actual map name based on the active maps stored in the matchmaking service. But that only helps us for this season.
Matches map filter for this season, using mapping from matchmaking service
Matches map filter for season 19, no mapping can be done easily
This issue also affects the matchup statistics, when the maps played are from older seasons.
Looking at the DB dumps, it seems that the proper map name has usually been provided in MatchFinishedEvent documents, under match.mapName. I propose this temporary handler, which will go through all historical MatchFinishedEvent documents and provide a mapName on GamesPerSeason objects in the MapsPerSeasonCollection. The temporary handler could then be deleted, as MapsPerSeasonHandler would store map names from now on.
Before the new handler is run
After the handler is run
This will enable us to provide a list of the map names in each season, for match filters. It will also allow us to provide a mapping of file name -> actual map name for each season, to help present data stored in other collections such as the matchup per map statistics.