Skip to content

feat(TeamParticipants): include tournament start and end dates#7466

Open
Eetwalt wants to merge 9 commits intomainfrom
tp-dates
Open

feat(TeamParticipants): include tournament start and end dates#7466
Eetwalt wants to merge 9 commits intomainfrom
tp-dates

Conversation

@Eetwalt
Copy link
Copy Markdown
Collaborator

@Eetwalt Eetwalt commented May 6, 2026

Summary

  • Include tournament start and end dates when querying team participants

How did you test this change?

dev

https://liquipedia.net/counterstrike/User:Eetwalt

@Eetwalt Eetwalt requested a review from a team as a code owner May 6, 2026 10:17
Copilot AI review requested due to automatic review settings May 6, 2026 10:17
@Eetwalt Eetwalt requested a review from a team as a code owner May 6, 2026 10:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / leavedate from wiki input into each player’s extradata.
  • Enrich players by querying the transfer LPDB table (within tournament_startdatetournament_enddate) when explicit dates are missing.
  • Persist joindate / leavedate into 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.

Comment thread lua/definitions/mw.lua Outdated
Comment thread lua/wikis/commons/TeamParticipants/Controller.lua
Copy link
Copy Markdown
Collaborator

@hjpalpha hjpalpha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@Rathoz
Copy link
Copy Markdown
Collaborator

Rathoz commented May 7, 2026

It's already enabled, always, on the existing TeamCard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants