/pastCycles also returns the active season

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
php
Domain
api, backend

Research direction

Start in src/Controller/CycleController.php, where the GET /pastCycles handler returns every score including the active cycle, and check the frontend seasons view to see what it expects. Then read the test pinned near line 203 of tests/Api/CycleTest.php, marked NOTE: current behaviour. First settle whether the endpoint should exclude the active cycle or be renamed or documented, since the issue leaves that open. Done means the chosen behaviour is implemented and the pinned test is updated to match.

Written by the indexing model from the issue text.

Description

Backend bug severity: low

Problem

Despite its name, GET /pastCycles returns every score of the user, including the currently active cycle.

Expected

Decide what is intended: either filter out the active cycle, or rename or document the endpoint. Check what the frontend's seasons view expects before changing it.

Where

src/Controller/CycleController.php.
Pinned in tests/Api/CycleTest.php (around line 203).


Found by the API test suite added for #57 (branch feature/57-symfony-7.4); the behaviour is the same before and after the Symfony 7.4 upgrade. The current behaviour is pinned in the test named above (marked NOTE: current behaviour), so update that test together with the fix.

Dominant language
PHP
Stars
1
Forks
0
Avg merge
7h 58m
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RunningJoke/allipunkte

All issues in RunningJoke/allipunkte

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.