Correcting the block event of calender #28686#28697
Correcting the block event of calender #28686#28697dhruveshmishra wants to merge 4 commits intocalcom:mainfrom
Conversation
Change "Neuen Termin buchen" (Book new appointment) to "Neu terminieren" (Re-schedule) to align with the English "Reschedule" meaning.
|
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: |
There was a problem hiding this comment.
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",{ |
There was a problem hiding this comment.
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.)
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>
Ryukemeister
left a comment
There was a problem hiding this comment.
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!
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!