Skip to content

I1251 wti scoreboard groups#1275

Open
clevengr wants to merge 2 commits into
pc2ccs:developfrom
clevengr:i1251_WTI_Scoreboard_Groups
Open

I1251 wti scoreboard groups#1275
clevengr wants to merge 2 commits into
pc2ccs:developfrom
clevengr:i1251_WTI_Scoreboard_Groups

Conversation

@clevengr
Copy link
Copy Markdown
Contributor

@clevengr clevengr commented May 12, 2026

Description of what the PR does

Adds support for selecting different groups on the WTI scoreboard. Specifically,

  • Updates WTI-UI scoreboard-page.component.{ts,html,sccs} so that if there is more than one group containing teams in the contest, a dropdown list for group selection appears on the WTI Scoreboard page; selecting a group from the dropdown causes the scoreboard to display (only) teams in the selected group, ranked from 1..N within the selected group.
  • Updates WTI-API ContestController so that it augments the JSON returned to a scoreboard endpoint query to include all groups of which the requesting team is a member (the existing implementation only provides a team's "primary group", which is not sufficient to determine what teams to display if teams can be members of more than one group).

What the PR does NOT do:

  • Does not provide support for contests set up with "divisions" (for example, PacNW contests). That is, the PR only supports contests where there is no wtiBoardUseDivisions entry in the WTI pc2v9.ini file. Support for divisions will be handled via work under a separate Issue: Improve/automate/redesign how divisions are handled #689.

Issue which the PR addresses

Fixes #1251

Environment in which the PR was developed:

Windows 11, java version "1.8.0_381", Chrome Version 148.0.7778.96 (Official Build) (64-bit)

Precise steps for testing the PR:

Setup

  • Download and unzip the PR distribution (or build it on your own machine from the branch).

Verify that the WTI Scoreboard works correctly when there are multiple displayable groups but a given team only appears in single group.

  1. Download and unzip the WF49BakuFinalized.zip file from https://drive.google.com/drive/folders/1GPl7c8MzmhSUZ905vvPkpE59FR_Y4EwC?usp=drive_link. This is a PC2 profile for the WF Baku contest, in which there are multiple displayable groups but each team is a member of only one group.
  2. Copy the /profiles folder and the profiles.properties file into the root of the unzipped PC2 distribution.
  3. Start a PC2 server and PC2 Admin.
  4. Verify that the Admin shows accounts, problems, etc. from the proper contest.
  5. On the PC2 Admin ConfigureContest>Accounts tab, edit the scoreboard2 account: change the password to "scoreboard2" (an alternative would be to update the WTI pc2v9.ini file to specify the existing scoreboard2 password prior to starting the WTI Server).
  6. In the PC2 distribution "projects" folder, unzip the WTI-Interface.zip file.
  7. In the resulting WTI-Interface folder, start the WTI Server (./bin/pc2wti).
  8. Verify that the last line on the console indicates the server was started.
  9. Open a browser. Either clear the browser's cache, or open an "Icognito mode" browser window.
  10. Connect to the WTI server (typically by opening http://localhost:8080).
  11. Login as a team. You can use any team in the contest, but you'll have to look on the PC2 Admin Accounts tab, select a team, and Edit the team to get the correct password.
  12. Select the Scoreboard menu on the WTI.
  13. Verify that a Group dropdown list appears at the top of the scoreboard, and that the default (selected) entry is "All teams".
  14. Verify that the rankings shown on the WTI scoreboard match those shown on the PC2 Admin RunContest>Standings screen.
  15. On the WTI Scoreboard Groups dropdown, select a specific group.
  16. On the PC2 Admin RunContest>Standings screen, click the checkbox in the right-side panel that matches the selected group.
  17. Verify that standings shown in the WTI Scoreboard match those shown on the PC2 Admin for the same group.
  18. If desired (just to convince yourself), select different groups on the WTI and PC2 Admin and verify they match.

Verify that the WTI Scoreboard works correctly when there are multiple displayable groups and a given team appears in multiple groups.

  1. Shut down the WTI browser and the WTI Server.
  2. On the PC2 Admin Configure Contest screen, Accounts tab, select any team. Notice what Group is listed for that team (in the Groups column).
  3. Click the Edit button, and scroll down in the Groups pane and verify that the correct Group (from the previous step) is checked.
  4. Add a checkmark for a DIFFERENT GROUP -- but make sure it is one of the actual groups for this contest (Africa&Arab, Asia East, Asia West, Asia Pacific, Europe, Latin America, Northern Eurasia, or North America). Do NOT disable the checkmark which already existed. (The effect of this is that you have put this particular team in multiple groups).
  5. Repeat the above step for an additional one or two teams -- so that you have several teams in multiple different groups.
  6. Restart the WTI server, open a browser, login as a team, and select the WTI "Scoreboard" menu.
  7. Select each of the groups in the dropdown "Group" list; verify that each team you assigned to multiple groups does appear in that group's scoreboard (and also that each team still appears in its original group scoreboard).
  8. Verify that each group's WTI scoreboard matches the PC2 Admin Standings for that group.

Verify that the WTI Scoreboard works correctly when there is exactly one displayable group and all teams are in that group.

  1. Shut down the WTI browser, the WTI Server, the PC2 Admin, and the PC2 server.
  2. In the PC2 distribution root, DELETE the profiles and logs folders, and the profiles.properties file.
  3. In the PC2 distribution projects folder, DELETE the WebTeamInterface folder (but not the .zip file from which that folder was extracted). This puts you back to a clean PC2 installation.
  4. Download and unzip the GNY2025Finalized.zip file from https://drive.google.com/drive/folders/1GPl7c8MzmhSUZ905vvPkpE59FR_Y4EwC?usp=drive_link. (This is a contest with just one displayable group.)
  5. Copy the /profiles folder and the profiles.properties file into the root of the unzipped (clean) PC2 distribution.
  6. Follow steps 3-12 (only) above to get to the WTI Scoreboard page. (Note: the Admin password is "Gny2o25".)
  7. Verify that there is no "Group" dropdown on the WTI scoreboard. (This is because the PR only provides a "Group" dropdown when there's more than one selectable group.)
  8. If desired, verify that the WTI scoreboard results as shown match PC2. Since the contest is "Finalized" but the Scoreboard is still "Frozen", you will see "Pending Runs" on the WTI scoreboard. To unfreeze the scoreboard, you'll need to do the following:
    • On the PC2 Admin Settings tab, click Unfreeze Scoreboard.
    • Click Update at the bottom of the Admin Settings screen.
  9. Verify that the WTI scoreboard standings match those shown in the PC2 Admin ConfigureContest>Standings tab.

Verify that contests without groups work correctly.

  1. Shut down the WTI browser, the WTI Server, the PC2 Admin, and the PC2 server.
  2. In the PC2 distribution root, DELETE the profiles and logs folders, and the profiles.properties file.
  3. In the PC2 distribution projects folder, DELETE the WebTeamInterface folder (but not the .zip file from which that folder was extracted). This puts you back to a clean PC2 installation.
  4. Download and unzip the PC2MultiSumitHelloSample.zip file from https://drive.google.com/drive/folders/1GPl7c8MzmhSUZ905vvPkpE59FR_Y4EwC?usp=drive_link. This is a PC2 profile for a contest with no groups.
  5. Copy the /profiles folder and the profiles.properties file into the root of the unzipped (clean) PC2 distribution.
  6. Follow steps 3-12 (only) above to get to the WTI Scoreboard page. The PC2 Admin password is the default; there should be 8 problems in the contest named Hello1, Hello2, Hello3, Hello4, Sumit1, Sumit2, Sumit3, and Sumit4. There should be 28 runs in the contest.
  7. Verify that there is no "Group" dropdown on the WTI scoreboard. (This is because the PR only provides a "Group" dropdown when there's more than one selectable group.)
  8. Verify that the WTI scoreboard standings match those shown in the PC2 Admin ConfigureContest>Standings tab.

@clevengr clevengr added this to the 9.11.0 milestone May 12, 2026
@clevengr clevengr added enhancement New feature or request WTI-UI This bug or feature request applies to the WTI-UI (browser-side). WTI-API Server WTI Backend change NEXT Contest Consider fixing for next contet labels May 12, 2026
@johnbrvc
Copy link
Copy Markdown
Collaborator

I found the following during testing using the procedure in the PR description.

  1. General: Pressing F5 when a group is selected on the scoreboard resets it to show all teams. This is probably the desired operation, after all, F5 is "reset". I'm just making the comment.
  2. For the PacNWSpring24 contest with divisions. I logged in as team151 (a D2 team). The WTI scoreboard shows both sets of problems on the same page which is somewhat confusing:
image

This is because I did not set wtiBoardUseDivisions=true in the pc2v9.ini file. That being said, the procedure above should say to set that flag. However, proceeding along, if I select group "British Columbia - D1" (for lack of anything better), it still shows the problems for D2 on the right of the scoreboard, albeit, all zeros:

image

I'm not sure what is supposed to be shown here. Similarly, if I select, say, "California", I see both divisions and both sets of problems:

image

So, I decided to rerun the WTI server with the wtiBoardUseDivisions=true flag set in the pc2v9.ini file. What I then see are the correct teams listed for the selected group, but their scores are always 0.

image

I don't think that's right. The Division filtering appears to work; that is, I only see D2 teams, even if a D1 group is selected:

image

Perhaps if wtiBoardUseDivisions is true, then omit the groups for the other division(s) from the drop down?

  1. On the WTI server command prompt screen, I am seeing debug messages:
image

Are the accidental left over messages?
4) The only contest I noticed issues with was the one with divisions, PacNWSpring24. All other tests worked as described.

Copy link
Copy Markdown
Collaborator

@johnbrvc johnbrvc left a comment

Choose a reason for hiding this comment

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

I'm thinking something has to be done in the .ts code to deal properly with divisions. I'm not sure where though since there is A LOT of new code to support groups. Nevertheless, I think the division issue described in the comments of the PR should be addressed somehow.

@clevengr
Copy link
Copy Markdown
Contributor Author

I'm thinking something has to be done in the .ts code to deal properly with divisions. I'm not sure where though since there is A LOT of new code to support groups. Nevertheless, I think the division issue described in the comments of the PR should be addressed somehow.

Dealing properly with divisions is such a significant process that it should be done under a separate issue; probably #689. I'll work on that separately.

@clevengr clevengr requested a review from johnbrvc May 23, 2026 01:23
@clevengr
Copy link
Copy Markdown
Contributor Author

I updated the PR to reflect that it only applies to contests without divisions (i.e., no wtiBoardUseDivisions flag in the WTI Server's pc2v9.ini. I'll work on handling divisions under Issue #689.

I also updated the "How to test the PR" steps to correctly test for a contest with teams in multiple groups without having to use the PacNW2024 contest (which uses Divisions). The second test in the steps is the new one.

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

Labels

enhancement New feature or request NEXT Contest Consider fixing for next contet WTI-API Server WTI Backend change WTI-UI This bug or feature request applies to the WTI-UI (browser-side).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WTI should allow selection of Scoreboard based on Groups

2 participants