From c819b488918c87b7385fc85b8252aaf6c68e1274 Mon Sep 17 00:00:00 2001 From: jmgasper Date: Fri, 31 Jul 2026 13:00:13 +1000 Subject: [PATCH] PM-5488: Keep active registered challenges in My Challenges What was broken The previous fix limited My Challenges to ACTIVE challenges with an open Submission phase. Registered members therefore lost challenges once submission closed even though the challenge remained ACTIVE for review. Root cause The public-list phase filter added in PR #7243 was also applied to the member-scoped My Challenges request. The existing memberId filter already identifies registered challenges, so currentPhaseName over-restricted the results. What was changed Removed the Submission phase constraint only from My Challenges. Kept the ACTIVE status and memberId filters, and retained the Submission filters for All and the total count so scheduled and later-phase challenges remain excluded from the public live list. Any added/updated tests Updated the action regression test to require ACTIVE status and memberId while explicitly verifying that currentPhaseName is omitted. The existing All and total-count tests continue to cover their Submission filters. --- __tests__/shared/actions/challenge-listing/index.js | 5 +++-- src/shared/actions/challenge-listing/index.js | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/shared/actions/challenge-listing/index.js b/__tests__/shared/actions/challenge-listing/index.js index 410ab5722..c2a918424 100644 --- a/__tests__/shared/actions/challenge-listing/index.js +++ b/__tests__/shared/actions/challenge-listing/index.js @@ -60,7 +60,7 @@ describe('live challenge listing filters', () => { })); }); - test('only requests My Challenges with an open submission phase', async () => { + test('requests all active challenges registered to the member', async () => { const action = actions.getMyChallengesDone( 'my-uuid', 0, @@ -74,11 +74,12 @@ describe('live challenge listing filters', () => { expect(mockGetChallenges).toHaveBeenCalledWith(expect.objectContaining({ backendFilter, frontFilter: expect.objectContaining({ - currentPhaseName: 'Submission', memberId: '123', status: 'ACTIVE', }), })); + expect(mockGetChallenges.mock.calls[0][0].frontFilter) + .not.toHaveProperty('currentPhaseName'); }); test('counts only live challenges with an open submission phase', async () => { diff --git a/src/shared/actions/challenge-listing/index.js b/src/shared/actions/challenge-listing/index.js index a1f1c6f3a..67cd3acb1 100644 --- a/src/shared/actions/challenge-listing/index.js +++ b/src/shared/actions/challenge-listing/index.js @@ -303,7 +303,6 @@ function getMyChallengesDone(uuid, page, backendFilter, tokenV3, frontFilter = { ...frontFilter, ...extractSearchFilter(frontFilter), status: 'ACTIVE', - currentPhaseName: 'Submission', memberId: userId, perPage: PAGE_SIZE, page: page + 1,