Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the TeamParticipants pipeline to populate player join/leave dates (either explicitly via wiki input or automatically via LPDB transfer lookups bounded by the tournament start/end dates), and exposes those dates via page vars for downstream consumption.
Changes:
- Parse
joindate/leavedatefrom wiki input into each player’sextradata. - Enrich players by querying the
transferLPDB table (withintournament_startdate→tournament_enddate) when explicit dates are missing. - Persist
joindate/leavedateinto global page variables and add a dedicated spec file for the new behavior.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/wikis/commons/TeamParticipants/Repository.lua | Adds transfer-date lookup logic and writes join/leave dates into global page vars. |
| lua/wikis/commons/TeamParticipants/Parse/Wiki.lua | Parses joindate / leavedate from wiki input into player.extradata. |
| lua/wikis/commons/TeamParticipants/Controller.lua | Adds a render-time enrichment step to fill missing join/leave dates via the repository. |
| lua/spec/team_participants_dates_spec.lua | Adds unit tests covering parsing, LPDB lookup fallbacks, and page-var writes. |
| lua/definitions/mw.lua | Extends the test mw.language:formatDate mock to support Y-m-d. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
this will worsen perf, why not first use the squad data during that import (start date should be retrievable from it if there is a squad entry and if the squad entry has a leave date that works as leave date if not the leave date automatically is tournament enddate) and only query if after that some players still have the dates unset (i.e. ones that did not get added by squad import)?
this is counterproductive for craft wikis, so a way to disable this would be good, preferably via a global setting so it doesn't have to be disabled in every single team participant
i think this adds a blocker for rollout on warcraft (which currently could use the new stuff)
and adds additional blockers for sc, sc2 (which still have 2 additional ones already)
|
It's already enabled, always, on the existing TeamCard |
Summary
How did you test this change?
dev
https://liquipedia.net/counterstrike/User:Eetwalt