A locker reservation saved with no end date and the "indefinite" box unticked is stored as indefinite

Open
#1,098 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
backend

Research direction

Start with src/services/lockers/reservations/schemas.ts and operations.ts, then trace how the form's empty end date and unchecked indefinite box are validated and saved. The issue leaves the intended behavior unresolved: determine whether an end date should be required, and check with the maintainer before changing the rule. Done means the agreed behavior is enforced and covered by a test.

Written by the indexing model from the issue text.

Description

In the locker reservation form, leaving the end date empty without ticking the box for an indefinite reservation is accepted, and the reservation is stored with no end date, which means it lasts until it is changed.

This is how it has always behaved, and the schema's comment says a reservation with no end date lasts until it is changed. The question is whether that is meant when the box is not ticked, or whether an end date should then be required.

Found by the review bot on #1073, which moved the form without changing the rule.

Where: src/services/lockers/reservations/schemas.ts and operations.ts.

Dominant language
TypeScript
Stars
11
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

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 vevcom/project-next

All issues in vevcom/project-next

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.