Skip to content

Correcting the block event of calender #28686#28697

Draft
dhruveshmishra wants to merge 4 commits intocalcom:mainfrom
dhruveshmishra:correcting
Draft

Correcting the block event of calender #28686#28697
dhruveshmishra wants to merge 4 commits intocalcom:mainfrom
dhruveshmishra:correcting

Conversation

@dhruveshmishra
Copy link
Copy Markdown
Contributor

Fixed #28686

When user connects their Nextcloud calender via caldav the event in that calender were not blocking the availability slots on the booking page. This meant the main problem was that people could book meetings even when the user already had events in their Nextcloud calendar.

Root cause:
The main cause of this was the Availability method in the CalenderService.ts . It was only checking one condition to skip free event.it was missing two important cases X-MICROSOFT-CDO-INTENDEDSTATUS:FREE , this uses as extended property to mark events as free. Cal.com was not reading this field at all, so these events were wrongly blocking slots.
STATUS:CANCELLED: Cancelled event still showing in caldav feed . Cal.com was treating them as busy and blocking slots even though the event no longer exists.

Changes:
Fix 1: Added two missing checks in Availability section to read the free and cancel condition
Fix 2: Wrapped per calender fetch in in try/ catch inside fetchobject section so if one Nextcloud calendar fails to fetch, the other calendars still work correctly.
fix 3: Added error logging for rejected fetch promises so failures are now visible in logs and can be debugged.

This is the solution for the code which I consider it correct please go through it.
Any Question are welcome
Thank you!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "Correcting the block event of calender #28686". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@github-actions github-actions bot added the 🐛 bug Something isn't working label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/lib/CalendarService.ts">

<violation number="1" location="packages/lib/CalendarService.ts:919">
P1: Custom agent: **Avoid Logging Sensitive Information**

Do not log raw error objects/reasons here; sanitize to message/code-only fields to avoid leaking sensitive data.

(Based on your team's feedback about avoiding raw error object logging that may expose sensitive data.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

return processedResponse;
}
catch(err){
logger.error("Enter calender object",{
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Custom agent: Avoid Logging Sensitive Information

Do not log raw error objects/reasons here; sanitize to message/code-only fields to avoid leaking sensitive data.

(Based on your team's feedback about avoiding raw error object logging that may expose sensitive data.)

View Feedback

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/lib/CalendarService.ts, line 919:

<comment>Do not log raw error objects/reasons here; sanitize to message/code-only fields to avoid leaking sensitive data.

(Based on your team's feedback about avoiding raw error object logging that may expose sensitive data.) </comment>

<file context>
@@ -910,12 +914,31 @@ export default abstract class BaseCalendarService implements Calendar {
       return processedResponse;
+    }
+    catch(err){
+      logger.error("Enter calender object",{
+        externalId: sc.externalId,  // tell you which calendar failed
+        error: err,
</file context>
Fix with Cubic

Copy link
Copy Markdown
Contributor

@Ryukemeister Ryukemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi there, thank you for your contribution. can you attach a visual demo of the fix before/after. we also need to add relevant tests for the fix, can you please add some tests as well. thank you!

@Ryukemeister Ryukemeister marked this pull request as draft April 1, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing to fetch busy slots on Nextcloud Calendars (events not blocking slots)

3 participants