Skip to content

[CAL-2569] Fallback of using the first connected calendar isn’t reliable #11671

@hariombalhara

Description

@hariombalhara

As we don’t explicitly sort the credentials in ascending order of [credentialId](https://github.com/calcom/cal.com/blob/1f6e80558b97f1b61d7c1885661611f2e0d57633/packages/core/EventManager.ts#L98), we get the list of credentials in descending order of last updated time in DB(so it seems) and thus whenever a new credential is added or existing credential is modified, we erroneously consider that credential as the first one, instead of the first added one actually.

This is problematic because depending on the calendar apps installation/uninstallation/updating, the target destination calendar might change without user knowing.

We should sort like videoCredentials

From SyncLinear.com | CAL-2569

Metadata

Metadata

Assignees

No one assigned

    Labels

    High priorityCreated by Linear-GitHub Synccalendar-appsarea: calendar, google calendar, outlook, lark, microsoft 365, apple calendarfoundation🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions