Skip to content

Fix: Checkpoint prizes are not shown for challenges with checkpoint phase#1756

Open
loigaak wants to merge 1 commit into
topcoder-platform:developfrom
loigaak:fix/issue-1096
Open

Fix: Checkpoint prizes are not shown for challenges with checkpoint phase#1756
loigaak wants to merge 1 commit into
topcoder-platform:developfrom
loigaak:fix/issue-1096

Conversation

@loigaak

@loigaak loigaak commented May 31, 2026

Copy link
Copy Markdown

Fixes #1096

This PR addresses the issue where checkpoint prizes were not correctly displayed or handled for challenges with a checkpoint phase.

The changes include:

  • Modifying CheckpointPrizes-Field to ensure that individual prizes within the CHECKPOINT_PRIZES prize set are correctly assigned the CHALLENGE_PRIZE_TYPE.CHECKPOINT type.
  • Updating getPrizeType utility function to reliably return USD or POINT based on PLACEMENT or COPILOT_PAYMENT prize sets, preventing CHECKPOINT from being misinterpreted as a currency type.
  • Adjusting applyPrizeTypeToPrizeSets to only modify the type of prizes within PLACEMENT and COPILOT_PAYMENT prize sets, leaving CHECKPOINT prize types untouched.

These changes ensure that checkpoint prizes are correctly structured in the challenge object and displayed with the appropriate currency symbol, aligning with the issue's requirements.

…hase

This commit addresses GitHub Issue topcoder-platform#1096 by ensuring checkpoint prizes are correctly structured and displayed.

Key changes include:
- In `CheckpointPrizes-Field`, individual prizes within the `CHECKPOINT_PRIZES` prize set are now explicitly assigned the `CHALLENGE_PRIZE_TYPE.CHECKPOINT` type.
- The display currency symbol for checkpoint prizes is now consistently derived from the main challenge's prize type (USD or POINT).
- The `getPrizeType` utility function has been enhanced to robustly determine the challenge's currency type, ignoring `CHECKPOINT` as a currency.
- The `applyPrizeTypeToPrizeSets` utility function is updated to only modify `PLACEMENT` and `COPILOT_PAYMENT` prize types, preserving the `CHECKPOINT` type for checkpoint prizes.
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.

[$75] Checkpoint prize is not shown for the challenge with a checkpoint phase

1 participant