Skip to content

feat: add iCalSequence to new booking data#22899

Merged
anikdhabal merged 7 commits intocalcom:mainfrom
Devanshusharma2005:fix/ics-sequence
Sep 2, 2025
Merged

feat: add iCalSequence to new booking data#22899
anikdhabal merged 7 commits intocalcom:mainfrom
Devanshusharma2005:fix/ics-sequence

Conversation

@Devanshusharma2005
Copy link
Contributor

What does this PR do?

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

@Devanshusharma2005 Devanshusharma2005 requested a review from a team as a code owner August 5, 2025 12:02
@vercel
Copy link

vercel bot commented Aug 5, 2025

@Devanshusharma2005 is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 5, 2025

Caution

Review failed

The head commit changed during the review from 2d869ac to f8e9537.

📝 Walkthrough

Walkthrough

The buildNewBookingData function in packages/features/bookings/lib/handleNewBooking/createBooking.ts was modified to update the logic for setting the iCalSequence property. Instead of assigning iCalSequence to evt.iCalSequence or defaulting to 0, it now conditionally increments the sequence by 1 if originalRescheduledBooking exists, setting iCalSequence to (evt.iCalSequence || 0) + 1; otherwise, it is set to 0. No other logic, control flow, or exported/public entities were changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Assessment against linked issues

Objective Addressed Explanation
Ensure iCalSequence is included and correctly incremented for rescheduled bookings (#22779, CAL-6164)
Ensure default value for iCalSequence is set when not provided (#22779, CAL-6164)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes detected.

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Aug 5, 2025
@graphite-app graphite-app bot requested a review from a team August 5, 2025 12:02
@github-actions github-actions bot added consumer Low priority Created by Linear-GitHub Sync webhooks area: webhooks, callback, webhook payload 🐛 bug Something isn't working labels Aug 5, 2025
@keithwillcode keithwillcode added the community-interns The team responsible for reviewing, testing and shipping low/medium community PRs label Aug 5, 2025
@dosubot dosubot bot added bookings area: bookings, availability, timezones, double booking ✨ feature New feature or request labels Aug 5, 2025
@graphite-app
Copy link

graphite-app bot commented Aug 5, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (08/05/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (08/05/25)

1 label was added to this PR based on Keith Williams's automation.

dynamicEventSlugRef: !eventType.id ? eventType.slug : null,
dynamicGroupSlugRef: !eventType.id ? (reqBody.user as string).toLowerCase() : null,
iCalUID: evt.iCalUID ?? "",
iCalSequence: evt.iCalSequence ?? 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

The issue is for reschedule booking not for new booking. Also need to increment the sequence on each reschedule. So iCalSequence: (evt.iCalSequence || 0) + 1,

@github-actions github-actions bot marked this pull request as draft August 5, 2025 12:39
@Devanshusharma2005 Devanshusharma2005 marked this pull request as ready for review August 6, 2025 04:28
volnei
volnei previously approved these changes Aug 8, 2025
dynamicEventSlugRef: !eventType.id ? eventType.slug : null,
dynamicGroupSlugRef: !eventType.id ? (reqBody.user as string).toLowerCase() : null,
iCalUID: evt.iCalUID ?? "",
iCalSequence: originalRescheduledBooking ? (evt.iCalSequence || 0) + 1 : 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a function called getICalSequence inside the handleNewBooking file, where we handle the iCalSequence. Can you please check why it's not working and keep this change in a single place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Will look at it.

@github-actions github-actions bot marked this pull request as draft August 8, 2025 12:10
@github-actions
Copy link
Contributor

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Aug 23, 2025
Copy link
Contributor

@anikdhabal anikdhabal left a comment

Choose a reason for hiding this comment

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

Looks good

@anikdhabal anikdhabal marked this pull request as ready for review September 2, 2025 03:51
@anikdhabal anikdhabal enabled auto-merge (squash) September 2, 2025 03:51
@anikdhabal anikdhabal requested a review from volnei September 2, 2025 03:51
@anikdhabal anikdhabal merged commit d125064 into calcom:main Sep 2, 2025
55 of 60 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2025

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working community Created by Linear-GitHub Sync community-interns The team responsible for reviewing, testing and shipping low/medium community PRs consumer ✨ feature New feature or request Low priority Created by Linear-GitHub Sync ready-for-e2e Stale webhooks area: webhooks, callback, webhook payload

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rescheduled bookings: ICS sequence numbers don't increment after 1

4 participants