Skip to content

i_1244 Get correct name and formal name for contest#1246

Open
johnbrvc wants to merge 3 commits into
pc2ccs:developfrom
johnbrvc:i1244_contest_name
Open

i_1244 Get correct name and formal name for contest#1246
johnbrvc wants to merge 3 commits into
pc2ccs:developfrom
johnbrvc:i1244_contest_name

Conversation

@johnbrvc
Copy link
Copy Markdown
Collaborator

Description of what the PR does

The CLICS formal_name contest.yaml property was never used - this should be the contest title (in PC2 terms), if present. If not present, then it should be set to the contest (short) name. Add formal_name to the sample clics_sumithello contest
CI: Fix ProfilesPane double-click to show more info about the active contest, eg. Profile ID, Contest ID, ContestInformation Name and ContestInformation Title (formal name).

Issue which the PR addresses

Fixes #1244

Environment in which the PR was developed (OS,IDE, Java version, etc.)

java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)

Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)

  1. Load a clean contest using the samps/contests/clics_sumithello contest (pc2server --server --login s --contestpassword contest --load samps\contests\clics_sumithello)
  2. Start an administrator client.
  3. From the Configure Contest -> Accounts tab, select the Generate button and create 1 feeder account.
  4. From the Configure Contest -> Profiles tab, Ctrl-Shift-Double-click the Active Profile Name label.
  5. All the information should be listed about the contest: image
  6. Start an event feeder client (pc2ef --login ef1)
  7. Press the Start button to enable the feed.
  8. From a command prompt do: curl -k https://administrator1:administrator1@localhost:50443/contests/SumH
  9. Note the correct strings for the id, name and formal_name properties.
    {"id":"SumH","name":"Sumit Hello Sample","formal_name":"The Sumit Hello Sample Contest", "start_time":null,"countdown_pause_time":null,"duration":"5:00:00","scoreboard_freeze_duration":"1:00:00", "scoreboard_thaw_time":null,"scoreboard_type":"pass-fail","penalty_time":20}
  10. From a command prompt, do: curl -k https://administrator1:administrator1@localhost:50443/contests/SumH/event-feed
  11. Scroll your command window back to first "contest" message and notice the correct properties for id, name and formal_name.
    {"type":"contest","token":"pc2-1","id": null,"data": {"id":"SumH","name":"Sumit Hello Sample", " formal_name":"The Sumit Hello Sample Contest","start_time":null,"countdown_pause_time":null, " duration":"5:00:00","scoreboard_freeze_duration":"1:00:00","scoreboard_thaw_time":null, " scoreboard_type":"pass-fail","penalty_time":20}}

The CLICS formal_name was never used - this should be the contest title, if present.  If not present, then it should be set to the contest (short) name.
Add formal_name to the sample clics_sumithello contest
CI: Fix ProfilesPane double-click to show more info about the active contest.
Apparently Eclipse adds extra backslashes when you paste an escaped string. *sigh*.  I know what I'm doing Eclipse, I don't need your help for this.
@johnbrvc johnbrvc added this to the 9.11.0 milestone Mar 29, 2026
@johnbrvc johnbrvc self-assigned this Mar 29, 2026
If there is no "id" property, we have to load legacy (pre-clics) contests, which use the short-name property as name, and name as formal_name.
CLICSContestsTest used the wrong name for the contest title, now that we fixed it.
Fix incorrect compare with "ICPC_WF_2011" which should be "ICPC WF 2011".
Update property names in testContestsElement/config/contest.yaml to be clics compliant.  Not sure what was there before but it certainly was NOT clics compliant.  ("id" is required by ALL CLICS specificaions), and short-name is not part of any CLICS specification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event feed "contest" notification has wrong "name"

1 participant