nextcloud / polls

🗳️ Polls app for Nextcloud
https://apps.nextcloud.com/apps/polls
GNU Affero General Public License v3.0
256 stars 73 forks source link

Scan for conflicts in subscribed calendars and recurring events #1531

Open dysonsphere-startmail opened 3 years ago

dysonsphere-startmail commented 3 years ago

I would like for my poll to check for conflicts on all the calendars I have in my Nextcloud Calendar. At the moment it checks only in calendars created in Nextcloud Calendar, and not any subscribed external calendars. Also, it does not seem to check for recurring events. If I set an event to repeat weekly the poll does not notice that that timeslot is unavailable.

I would like to be able to have the poll scan for conflicts in all my subscribed and native calendars and for recurring events.

At the moment I am creating a duplicate calendar entry for all my subscribed calendar appointments so that polls can see them as unavailable.

dartcafe commented 3 years ago

There are some limitations in the returned calendar object regarding recurring objects. I have some hope, that https://github.com/nextcloud/server/issues/25734 will be recognized by the core team. Otherwise, I would have to create a heavy workaround.

External calendars are not recognized as calendars of the user and are ignored. But I will investigate in this later.

stefan123t commented 3 years ago

Similar to the lettuce feature example (see #1694) or the ubiquitous mail-tool meeting planner that would need to access a free/busy calendar of some sort of every participant. This feature request is the simple case where the user only wants to check his own calendars. Which ? I would assume all which are currently visible in the nextcloud UI or does it need to be selectable ?

I think it would be worthwhile if the upstream nextcloud/server would implement such a free/busy calendar for nextcloud/polls to consume / query in such cases. Note that it would also be required that such a free/busy calendar would be discoverable for external users, i.e. if I enter my email address or nextcloud fediverse-id it would need to query a finger service that tells nextcloud/server where to find this persons free/busy calendar URL.

dartcafe commented 3 years ago

Which ? I would assume all which are currently visible in the nextcloud UI or does it need to be selectable ?

It is selectable in the settings.

free/busy

The free/busy information is not enough for this feature, because I as a participant want to know what appointments I have at and around the time of the option. I. e. if I have to respect preparation or travel time.

So I still hope, the linked bug will be fixed.

christrotzky commented 3 years ago

I would like for my poll to check for conflicts on all the calendars I have in my Nextcloud Calendar. At the moment it checks only in calendars created in Nextcloud Calendar, and not any subscribed external calendars.

Following up on this: Is there a solution or workaround available? I have a subscribed external calendar which should be considered for finding blocked events but I can't select that calendar in the "conflict" option.

Would it in general be possible to use a subscription for this, too? I.e. are all information available? I could then provide a fix for this if you point me to the right area in the code...

dartcafe commented 3 years ago

The starting point for the calendar functions is https://github.com/nextcloud/polls/blob/master/lib/Service/CalendarService.php

We are just using the public calendarManager for retrieving events and calendars of the user.

dysonsphere-startmail commented 2 years ago

A solution to this was found for the Appointments app. Maybe that is relevant for this as well?

dartcafe commented 2 years ago

Thanks for pointing on this, but the implementation integrates the calendar app's api. We rely on the core api, which hides the subscribed calendars.

Working with the calendar app's api requires didding into the calDav implementation, which will be hughe effort and is no fun.

So, I don't believe that we will adopt this implementation.

stefan123t commented 2 years ago

@dartcafe thanks for explaining your reliance on the core api. Is there an option to have a separate list of visibilities for the core api, i.e. a global polls or even per polls list of calendars that should be shown / hidden ? If this is not yet existing in the core api, wouldn't it be good to have such an additional option in the core api for both polls and the appointment app in order to not reinvent the wheel ?