Feat/match surface from game - #148
Merged
Merged
Conversation
Match#surface has been on the table with a validation and nothing ever wrote
it, so every one of the 115 rows on production shows "Surface: -" while the
game right next to it knows the answer. Saving stats now copies the game's
surface onto the row, falling back to the court's own when it offers exactly
one and the game left the field empty.
Match::SURFACES gains artificial_grass so the copy cannot fail validation on
a surface a court is allowed to offer; anything it still cannot store leaves
the old value alone rather than breaking the stats save.
A backfill for the existing rows comes with it — 77 of the 115 can be filled
from their game:
rake player_statistics:backfill_match_surfaces
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three fixes to the same line on the tennis life statistics page: The outcome is gone. The score is a single string counting team A first while "Result" came off the row the card was built from, so on the 14 matches whose representative sits in team B the two contradicted each other. The 2v2 badge was printed for every doubles row, which made a two-against-one look like a card that had lost a player. It now counts the players and guests actually on each side. The surface prints its label instead of the raw key, so a Russian page stops saying "hard". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A match is one against one or two against two, but the form let a block through with two players on one side and one on the other: nothing checked the sizes, so a forgotten player was saved as a game nobody played. Production carries exactly one such row (13.08, Denis + Катерина against Максим). Blocks that do not add up are now left unsaved and the alert says why, instead of the silent skip the other guards use — the rest of the form still saves. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.