Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing for conflicts doesn't work #565

Closed
Taxicletter opened this issue Nov 25, 2024 · 17 comments
Closed

Testing for conflicts doesn't work #565

Taxicletter opened this issue Nov 25, 2024 · 17 comments
Labels
bug Something isn't working

Comments

@Taxicletter
Copy link

Hi,
I used the appointments-app successfully for a long time. After a while, I need it again and am configuring it. I have NextCloud on my web-space and important my calender there. Maybe that's somehow part of the problem.
Then I set the calendar to book too. If I do that, I cannot set a different calendar to check for conflicts. I guess that's intended, because of course that would be the same calendar. But just mentioning it.
If I look for appointments, most of the booked spots still appear available. If book an appointment, the appointment is saved in my calender and is indeed not visible any-more as available. But I just created an event in my calendar, to make that an unavailable timeslot, and it keeps being selectable (I reload the page, so Appointments has the latest version of my calendar).
I know this used to work, so I guess I'm doing something wrong. But what?

The debug-info (blanked out personal info with ++++++++++++++):

Nextcloud Version: 30.0.2
Appointments Version: 2.3.2
Time zone: Europe/Brussels (calendar: N/A, core: Europe/Brussels)
Embeding Frame Ancestor: N/A
Embeding Button URL: N/A
Extension Notify: N/A
Key: Yes

{
  "enabled": true,
  "label": "++++++++++++++",
  "organization": "++++++++++++++",
  "email": "++++++++++++++",
  "address": "++++++++++++++",
  "phone": "0483303009",
  "confirmedRdrUrl": "",
  "confirmedRdrId": false,
  "confirmedRdrData": false,
  "mainCalId": "-1",
  "destCalId": "-1",
  "nrSrcCalId": "-1",
  "nrDstCalId": "-1",
  "nrPushRec": true,
  "nrRequireCat": false,
  "nrAutoFix": false,
  "tmmDstCalId": "2",
  "tmmMoreCals": [],
  "tmmSubscriptions": [],
  "tmmSubscriptionsSync": "0",
  "prepTime": "1440",
  "bufferBefore": 0,
  "bufferAfter": 0,
  "whenCanceled": "reset",
  "allDayBlock": false,
  "titleTemplate": "",
  "privatePage": false,
  "tsMode": "2",
  "icsFile": true,
  "skipEVS": true,
  "attMod": true,
  "attDel": true,
  "meReq": false,
  "meConfirm": true,
  "meCancel": false,
  "vldNote": "",
  "cnfNote": "",
  "icsNote": "",
  "formTitle": "",
  "nbrWeeks": "12",
  "showEmpty": false,
  "startFNED": false,
  "showWeekends": false,
  "time2Cols": false,
  "endTime": false,
  "hidePhone": false,
  "gdpr": "",
  "gdprNoChb": false,
  "pageTitle": "",
  "prefillInputs": 0,
  "prefilledType": 0,
  "formFinishText": "",
  "metaNoIndex": true,
  "pageStyle": "",
  "useNcTheme": true,
  "template_data": [
    [
      {
        "start": 46800,
        "dur": [
          60
        ],
        "title": "++++++++++++++"
      },
      {
        "start": 50400,
        "dur": [
          60
        ],
        "title": ++++++++++++++"
      }
    ],
    [],
    [],
    [
      {
        "start": 59400,
        "dur": [
          60
        ],
        "title": "++++++++++++++"
      },
      {
        "start": 63600,
        "dur": [
          60
        ],
        "title": "++++++++++++++"
      },
      {
        "start": 67800,
        "dur": [
          60
        ],
        "title": "++++++++++++++"
      }
    ],
    [],
    [],
    []
  ],
  "template_info": {
    "tzName": "Europe/Brussels",
    "tzData": "BEGIN:VTIMEZONE\r\nTZID:Europe/Brussels\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE"
  },
  "fi_html": "",
  "fi_json": [],
  "secHcapSiteKey": "",
  "secHcapSecret": "",
  "secHcapEnabled": false,
  "secEmailBlacklist": [],
  "reminders_data_0_seconds": "86400",
  "reminders_data_0_actions": true,
  "reminders_data_1_seconds": "0",
  "reminders_data_1_actions": true,
  "reminders_data_2_seconds": "0",
  "reminders_data_2_actions": true,
  "reminders_moreText": "",
  "reminders_friday": false,
  "talk_enabled": false,
  "talk_delete": false,
  "talk_emailText": "",
  "talk_lobby": false,
  "talk_password": false,
  "talk_nameFormat": 0,
  "talk_formFieldEnable": false,
  "talk_formLabel": "",
  "talk_formPlaceholder": "",
  "talk_formTxtReal": "",
  "talk_formTxtVirtual": "",
  "talk_formTxtTypeChange": "",
  "bbbEnabled": false,
  "bbbDelete": true,
  "bbbAutoDelete": true,
  "bbbPassword": false,
  "bbbFormEnabled": false,
  "debugging_mode": 0,
  "__ckey": ""
}
{
  "talk_formDefLabel": "Meeting Type",
  "talk_formDefPlaceholder": "Select meeting type",
  "talk_formDefReal": "In-person meeting",
  "talk_formDefVirtual": "Online (audio/video)",
  "talk_integration_disabled": true,
  "bbb_integration_disabled": true,
  "bjm": "cron",
  "cliUrl": "1",
  "defaultLang": "en",
  "token": "++++++++++++++"
}
[
  {
    "name": "Agenda",
    "color": "#0082c9",
    "id": "2",
    "isReadOnly": false,
    "isSubscription": false
  }
]
@SergeyMosin
Copy link
Owner

Can you make sure that the "Blocker" events are set as "Busy" and the "Classification" either set to either "When shared show full event" or "When shared show only busy", and if your blocker is a "Full Day" event, check Settings > Calendars and Schedule > Time Slot Settings > Include all day events in conflict check

image

@Taxicletter
Copy link
Author

Thank you Sergey, it aren't whole day blockers, and they are confirmed and busy (in Dutch).
Schermafdruk van 2024-11-25 19-34-13
Schermafdruk van 2024-11-25 19-35-33

@SergeyMosin
Copy link
Owner

Can you export the event and send me the .ics file to sergey [at] srgdev.com

@Taxicletter
Copy link
Author

Hi Sergey, I was thinking: I exported my calendar with BetterBird (because OpenDesktop was down). Could it help if I remove my Calendar from NextCloud and import an exported version (from OpenDesktop this time, since I can reach my account again today)?
Also, is this important: in OpenDesktop, I can see Appointments I created in the Calendar view, which is not the case in my own NextCloud instance.
afbeelding
afbeelding
(I mailed you the appointment yesterday, thank you for checking this out!!)

@Taxicletter
Copy link
Author

Taxicletter commented Nov 26, 2024

OK: I tried to import the calendar again, this time the OpenDesktop export. That didn't change anything.
Also: The appointments in the left sidebar are something different from your appointment-app. But I tried making appointments there, and also this app doesn't "see" the appointments already in the calendar.

EDIT:
I tested some other things: if I add an event with Betterbird/Thunderbird (tried both to be sure) it gets synced with the calendar, but is not acknowledged as conflict. If I add an event with the default Gnome-calendar, it's also synced, but then the conflict is seen by Appointments. And of course, if I create an event directly in Calendar, it also works like supposed to.

So it seems it's a problem with Betterbird, somehow. It changes something to events, that makes Appointments not recognise them as conflicting.

@SergeyMosin
Copy link
Owner

@Taxicletter thank you for the .ics file, but I still can not replicate this.

However, I have added a Get by Event UID debug option. It grabs the relevant data directly from the DB and could help figure out why the blockers do not work.

Step 1

In the Calendar App find and Export the even that does not block. Open the .ics file in a text editor, find and copy the UID
Example:

BEGIN:VCALENDAR
...
BEGIN:VEVENT
...
UID:1cd1c81b-e1d9-4318-b0c2-d4b221a2a739 <<<< THIS IS WHAT YOU NEED
...
END:VCALENDAR

Step 2

Inter the UID into Appointments > Settings > Advanced > Debugging > Get by Event UID and click the Arrow (see the image below)

Step 3

Something like this should be shown and classification should be 0:

array (
  'pageId' => 'p0',
  'uid' => '1cd1c81b-e1d9-4318-b0c2-d4b221a2a739',
  'eventData' => 
  array (
    0 => 
    array (
      'id' => 47,
      'calendardata' => '.....',
      'uri' => '5754974D-FB1A-4064-8541-86CBD0640270.ics',
      'calendarid' => 2,
      'lastmodified' => 1732643567,
      'etag' => '24ce98622cb98b49da2eafee718f5332',
      'size' => 579,
      'componenttype' => 'VEVENT',
      'firstoccurence' => 1732798800,
      'lastoccurence' => 1732802400,
      'uid' => '1cd1c81b-e1d9-4318-b0c2-d4b221a2a739',
      'classification' => 0,
      'calendartype' => 0,
      'deleted_at' => NULL,
    ),
  ),
  'pageCalendars' => 
  array (
...

image

@Taxicletter
Copy link
Author

Taxicletter commented Nov 26, 2024

Hi Sergey,
I don't see the "Get by Event UID". The only settings I can reach, is those from an appointment, there are no "general settings" as far as I can see?
image

EDIT: when in the "Get raw calendar data" field I select my calendar, I get an error "error: cannot get debug data" (but maybe that's normal?)

@SergeyMosin
Copy link
Owner

The new setting is in v2.3.3 (released about an hour ago)

@Taxicletter
Copy link
Author

Waaw, you are the fastest developer in the world :-)

Yes, classification is 0:

END:VEVENT
END:VCALENDAR
',
      'uri' => 'CCC70DC2-9A78-491C-9584-561D47B24197.ics',
      'calendarid' => 2,
      'lastmodified' => 1732650558,
      'etag' => '335e57bd9e31ea33456f8d9e82503501',
      'size' => 684,
      'componenttype' => 'VEVENT',
      'firstoccurence' => 1733238000,
      'lastoccurence' => 1733241600,
      'uid' => 'cbda3774-84b7-41a2-8811-d9d4b2ea2470',
      'classification' => 0,
      'calendartype' => 0,
      'deleted_at' => NULL,
    ),
  ),

@Taxicletter
Copy link
Author

Taxicletter commented Nov 27, 2024

Hi,
I added a new appointment page as a test and choose "simple" this time. When I publish the page, I get the error: "Main Calendar not found, check settings". My main calendar is "Agenda" and is selected.

afbeelding

Can that be the cause of this problem? That for some reason NextCloud doesn't recognise my calendar?
I made a new calendar and selected that in my settings, but that gives the same error.

@SergeyMosin SergeyMosin added the bug Something isn't working label Nov 27, 2024
@SergeyMosin
Copy link
Owner

Bug confirmed, possibly caused by out of order query->andWhere expression in fastQuery

@SergeyMosin
Copy link
Owner

should be fixed in v2.3.4

@Taxicletter
Copy link
Author

And it's fixed! That's fantastic! Thank you very much.

@growechris
Copy link

Hi,
we've got the same problem although we updated to v2.3.4
We also checked the points above.
We hope you can help us.

@SergeyMosin
Copy link
Owner

@growechris Are there any appointments related errors in Nextcloud logs ? Can you send me ( sergey [at] srgdev.com ) the settings dump for the page, it can be found in the Settings > Advanced > Debugging > Settings Dump ?

@growechris
Copy link

@SergeyMosin Thanks for your answer. I sent you the data by email.

@SergeyMosin
Copy link
Owner

@growechris It looks like you are using the Simple mode. In this mode conflicts are not checked (this actually why overlapping/multi-person appointments can be book via this method). Please consider the any of the other Modes.

Note: possibly a documentation related issue, ref: #167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants