nextcloud / nextcloud/calendar

Appointments not bookable on days that had a full day event previously

Open
#4,530 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug Feature: Appointments
Dominant language
JavaScript
Stars
1.2k
Forks
332
Avg merge
16h 13m
Merged PRs (30d)
137

Description

Steps to reproduce

This issue pops up in combination with Thunderbird Calendar but I haven't een able to determine the cause yet.

  1. Create a full day event from thunderbird and then delete it
  2. Try to book an appointment for that day
  3. The appointment configuration can't create slots for this time frame any more with an error
Expected behavior

The calendar is empty so a slot should be open.

Actual behaviour

No slots are available

Calendar app version

3.2.2

CalDAV-clients used

Thunderbird, Web

Browser

No response

Client operating system

No response

Server operating system

c.nc

Web server

No response

Database engine version

No response

PHP engine version

No response

Nextcloud version

No response

Updated from an older installed version or fresh install

No response

List of activated apps

No response

Nextcloud configuration

No response

Web server error log
{
  "reqId": "CppDl1UKv4nDBaAiAqeL",
  "level": 2,
  "time": "2022-08-02T11:59:02+00:00",
  "remoteAddr": "2001:4bb8:2c0:614a:7997:8abe:6420:1f00",
  "user": "anna",
  "app": "calendar",
  "method": "POST",
  "url": "/apps/calendar/appointment/31/book",
  "message": "No slot available for start: 1659448800, end: 1659451500, config id: 31",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
  "version": "24.0.3.2",
  "exception": {
    "Exception": "OCA\\Calendar\\Exception\\NoSlotFoundException",
    "Message": "Could not find slot for booking",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/calendar/lib/Controller/BookingController.php",
        "line": 185,
        "function": "book",
        "class": "OCA\\Calendar\\Service\\Appointments\\BookingService",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Calendar\\Db\\AppointmentConfig",
            "id": 31
          },
          1659448800,
          1659451500,
          "Europe/Vienna",
          "Anna Larch",
          "anna.larch@nextcloud.com",
          "Testing"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 225,
        "function": "bookSlot",
        "class": "OCA\\Calendar\\Controller\\BookingController",
        "type": "->",
        "args": [
          31,
          1659448800,
          1659451500,
          "Anna Larch",
          "anna.larch@nextcloud.com",
          "Testing",
          "Europe/Vienna"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 133,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Calendar\\Controller\\BookingController"
          },
          "bookSlot"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/App.php",
        "line": 172,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Calendar\\Controller\\BookingController"
          },
          "bookSlot"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/Route/Router.php",
        "line": 298,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Calendar\\Controller\\BookingController",
          "bookSlot",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          [
            31,
            "calendar.booking.bookSlot"
          ]
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/base.php",
        "line": 1023,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/calendar/appointment/31/book"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/cloud.nextcloud.com/nextcloud/apps/calendar/lib/Service/Appointments/BookingService.php",
    "Line": 128,
    "message": "No slot available for start: 1659448800, end: 1659451500, config id: 31",
    "exception": {},
    "CustomMessage": "No slot available for start: 1659448800, end: 1659451500, config id: 31"
  }
}
Log file

No response

Browser log

No response

Additional info

No response

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

Start in apps/calendar/lib/Service/Appointments/BookingService.php around line 128, then trace the booking request from BookingController.php around line 185. Reproduce the Thunderbird full-day event creation and deletion sequence, and verify that the affected day becomes available for appointment slots afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.