Skip to content

PLUG-4682: Fix extra-time/penalty results in World Cup match data streams#91

Open
TimWheeler-SQUP wants to merge 1 commit into
mainfrom
PLUG-4682-full-time-over-extra-time-result
Open

PLUG-4682: Fix extra-time/penalty results in World Cup match data streams#91
TimWheeler-SQUP wants to merge 1 commit into
mainfrom
PLUG-4682-full-time-over-extra-time-result

Conversation

@TimWheeler-SQUP

@TimWheeler-SQUP TimWheeler-SQUP commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

📋 Summary

The World Cup match data streams read only score.ft (the score after 90 minutes) from the openfootball feed. For knockout matches decided in extra time or on penalties, this shows the wrong result.

Most visible for England — e.g. the 2026 Quarter-final vs Norway ({"ft":[1,1],"et":[1,2]}) was shown as 1-1 and reported as a Draw, when England actually won 2-1 in extra time.

The fix updates the three knockout-capable scripts to prefer score.et over score.ft, and to append the penalty shootout result when present (e.g. 1-1 (4-3 pens)). last-match.js now also decides Win/Loss/Draw from the shootout rather than the pre-shootout scoreline. Group-stage streams are unaffected (group games can't go to extra time/penalties). Plugin bumped 1.2.1 → 1.2.2.

Verified by running the post-request scripts against the live 2026 feed and the completed 2022 feed (Argentina final 3-3 (4-2 pens) / Win; France 3-3 (2-4 pens) / Loss), and end-to-end via squaredup test against a deployed instance.


🔗 Related issue(s)


🧩 Plugin details

  • Plugin name: FIFA World Cup 2026 (worldcup2026)
  • Type of change:
    • Bug fix
    • New datastream
    • Enhancement to existing datastream
    • Performance improvement
    • Documentation / metadata / logo
    • Other (please describe):

⚠️ Breaking changes

Does this PR introduce any breaking changes?

  • No
  • Yes (please describe):

📚 Documentation

  • Documentation updated
  • No documentation changes needed

✅ Checklist

  • No secrets or credentials included
  • Plugin, datastream and UI naming follow SquaredUp guidelines
  • I agree to the Code of Conduct

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Match scores now accurately reflect extra-time results when applicable.
    • Penalty shootout scores are displayed alongside the final match score.
    • Match outcomes correctly identify the shootout winner.
  • Chores

    • Updated the World Cup 2026 plugin version to 1.2.2.

The match data streams read only score.ft (the 90-minute score) from the
openfootball feed, so knockout matches decided in extra time or on
penalties showed the wrong result — most visibly for England (e.g. the
2026 QF vs Norway, won 2-1 in extra time, shown as 1-1 and a Draw).

matches.js, knockout.js and last-match.js now prefer score.et over
score.ft and append the penalty shootout result, e.g. "1-1 (4-3 pens)".
last-match.js also decides Win/Loss/Draw from the shootout when present.

Bumps worldcup2026 to 1.2.2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@TimWheeler-SQUP TimWheeler-SQUP requested a review from a team July 14, 2026 13:37
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9f632fc3-2a78-4d72-9f72-e3609cb0ad4a

📥 Commits

Reviewing files that changed from the base of the PR and between 5a0a4f4 and 1e3b1b6.

📒 Files selected for processing (4)
  • plugins/WorldCup2026/v1/dataStreams/scripts/knockout.js
  • plugins/WorldCup2026/v1/dataStreams/scripts/last-match.js
  • plugins/WorldCup2026/v1/dataStreams/scripts/matches.js
  • plugins/WorldCup2026/v1/metadata.json

📝 Walkthrough

Walkthrough

The World Cup scripts now prefer extra-time scores, append penalty shootout results, and derive last-match outcomes from shootout winners. Plugin metadata is updated from version 1.2.1 to 1.2.2.

Changes

World Cup score handling

Layer / File(s) Summary
Extra-time and penalty score formatting
plugins/WorldCup2026/v1/dataStreams/scripts/knockout.js, plugins/WorldCup2026/v1/dataStreams/scripts/matches.js
Scores prefer extra-time values over full-time values and append penalty shootout details when available.
Last-match outcome construction
plugins/WorldCup2026/v1/dataStreams/scripts/last-match.js, plugins/WorldCup2026/v1/metadata.json
Last-match scores and outcomes use extra-time and penalty data, while plugin metadata is updated to version 1.2.2.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing extra-time and penalty result handling in World Cup match data streams.
Description check ✅ Passed The description is detailed and structured, covering summary, related issue, plugin details, breaking changes, docs, and checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🧩 Plugin PR Summary

📦 Modified Plugins

  • plugins/WorldCup2026/v1

📋 Results

Step Status
Validation ✅ Passed
Deployment 🚀 Deployed

🔍 Validation Details

worldcup2026
{
  "valid": true,
  "pluginName": "worldcup2026",
  "pluginType": "hybrid",
  "summary": {
    "Data Streams": 7,
    "Import Definitions": 1,
    "UI Configuration": false,
    "Has Icon": true,
    "Has Default Content": true,
    "Config Validation": true,
    "Custom Types": true
  }
}

@TimWheeler-SQUP TimWheeler-SQUP added the bug Something isn't working label Jul 14, 2026
@TimWheeler-SQUP TimWheeler-SQUP requested a review from masokisi July 14, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

1 participant