nextcloud / nextcloud/calendar

[Bug]: Appointment booking generates incorrect early-morning slots when event falls within second block of split (two-range) working hours

Open
#8,498 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug
Dominant language
JavaScript
Stars
1.2k
Forks
332
Avg merge
16h 13m
Merged PRs (30d)
137

Description

Steps to reproduce

Configure working hours in Groupware settings with two separate time blocks on the same day (e.g. Mon–Fri 09:00–13:00 and 14:00–17:00).
Create an appointment schedule using those hours as availability.
Add a calendar event on a specific day that falls within the second block (e.g. 14:15–16:30 — fully inside 14:00–17:00, not extending beyond it).
Open the public appointment booking page and select that day.

Environment

Nextcloud: latest (via Nextcloud AIO)
Calendar app: 6.4.2
Browser: Safari
OS: macOS

Expected behavior
Only time slots within the configured working hours should be shown, minus the conflicting event (e.g. 09:00–13:00 fully available, 14:00–14:15 available, 16:30–17:00 available).
Actual behavior
Slots before the event display correctly, but slots after the event are generated at incorrect early-morning times (e.g. 04:00–04:25, 04:30–04:55, etc.) instead of the correct remaining afternoon times. Slots also appear duplicated in some cases.
Additional context

This is not related to event duration or to the event extending past the working-hours cutoff — I confirmed this by shortening the event well within the second block and extending the working hours end time, and the bug persisted identically.
The actual trigger is having two separate time blocks on the same day in the availability settings, combined with a conflicting event inside the second block.
Using a single continuous availability range for the day (no split lunch break) with the exact same event resolves the issue completely.
This points to a bug in the slot-generation logic specifically when handling a conflict inside the second of two same-day availability windows.

Contributor guide

Open the 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.

Research direction

No files or tests are named. Reproduce the issue with two same-day availability blocks and an event inside the second block, then trace slot generation from the public appointment booking page; done means remaining slots keep the correct afternoon times without duplicates.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.