Repository navigation
feat: add optional year filter to admin cycles list (#800) - #803
Merged
dricazenck merged 2 commits intoOct 7, 2026
Merged
dricazenck merged 2 commits into
dricazenck merged 2 commits into
Conversation
wilsonadenuga
requested review from
OlenaReukova,
Sowmiya07,
Tooonia,
dricazenck,
lauracabtay,
nora-weisser and
nverbic
September 30, 2026 16:51
dricazenck
reviewed
Oct 5, 2026
dricazenck
reviewed
Oct 5, 2026
|
3 of 8 tasks
dricazenck
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Adds an optional
yearfilter to the admin cycles list, so the response stays small as cyclesbuild up over the years.
GET /api/platform/v1/admin/mentorship/cycles/all?year=2026returns only 2026 cycles. Withoutyear, it returns every cycle as before.The controller now calls a new
MentorshipCycleService.getCycles(year), which uses the existingMentorshipCycleRepository.findByYear(Integer)when a year is given andgetAll()otherwise.year=200, all cycles2026200, 2026 cycles1990(no data)200,[]26,0,20260400,"Year must be in YYYY format"abc,20a6400, Spring's conversion message via the existingIllegalArgumentExceptionhandler2026&year=2027200, uses the first valueNotes:
findByYearat repository level, like the rest ofMentorshipCycleIntegrationTest. The HTTP cases (no year,year=2026, bad values) are coveredin the new
MentorshipAdminMatchesControllerTest, since no integration test calls atoken-protected admin endpoint yet.
yearparam. Spring binds the first value.Related Issue
Closes #800
Change Type
Screenshots
Swagger screenshot of the
yearparam onGET /cycles/allto follow.Pull request checklist
Please check if your PR fulfills the following requirements: