nextcloud / deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
https://apps.nextcloud.com/apps/deck
GNU Affero General Public License v3.0
1.21k stars 276 forks source link

Integrate with Nextcloud CalDAV API [$185] #15

Closed juliusknorr closed 3 years ago

juliusknorr commented 7 years ago

This issue is about integrating deck with Nextclouds CalDAV API.

Current plan from the discussion below:

Deck CalDAV Tasks
Board VCALENDAR List
Stack VTODO without RELATED-TO property Root-Task
Card VTODO with RELATED-TO (UUID of the Root-Task / Stack) Subtask
Tags CATEGORIES or custom implementation (Nextcloud tagging system) Currently uses CATEGORIES, integration with Nextcloud tags would be better, see https://github.com/nextcloud/tasks/issues/89
Assigned users ATTENDEE or custom implementation ATTENDEE or custom implementation, see https://github.com/nextcloud/tasks/issues/72
Recurring stacks & cards RRULE Recurring tasks & subtasks, see https://github.com/nextcloud/tasks/issues/34
Attachments ATTACH or custom implementation ATTACH or custom implementation, see https://github.com/nextcloud/tasks/issues/91

Tags, assigning users, attachments and recurrence is not supported by Tasks yet either, but it would make much sense to implement these features. And if we see that it is not really possible to implement this with pure CalDAV I would be open to implement it without syncing it via CalDAV and have it only available in the webinterface. This would still be better than not having it at all in Tasks and would not limit Deck.

  1. Expose deck boards as VCALENDAR, try to map as much data from deck to the VTODO (read only access) #1545
  2. Allow updating VCALENDAR entries, try to map as much as possible from vtodo to the deck database and store the rest as plain vtodo data, so we can still push it out over CalDAV (write access) #2399
  3. Deck data could be moved to the DAV backend.
joergmschulz commented 7 years ago

as sharing the cards is essential, a log of changes to

Activities

would be nice.

poVoq commented 7 years ago

Would it be possible to have a common due date that is linked with the calendar as a shared event between multiple cards as a "milestone" with its own colored label displayed on the card? I.e. some sort of way to link labels to CalDav events?

poVoq commented 7 years ago

Another possible integration would be to link cards to CalDAV task categories, so that if a user creates a new CalDAV task in an external application (lets say OpenTasks on Android) and chooses the right category for it, Deck automatically uses the name of that category to sort it to the card with the same name.

juliusknorr commented 7 years ago

I thought a lot about how to integrate with the Nextcloud WebDAV/CalDAV/CardDAV interfaces, it will be not as simple as i initially thought. I'll take some time next week to write up what i had in mind and publish some kind of roadmap. :wink:

simonpostma commented 7 years ago

If subtasks become a thing in Deck, it can easily compete with whatever kanban system out there. Keeping the syncing with Tasks optional would be great imo.

Perhaps a functionality to make multiple decks if that is possible?

9662 commented 7 years ago

XMPP group-chat notifications for activities would be also nice.

It is a reasonable idea, but it belongs to the notifications part of Nextcloud, not to Deck.

Would it be possible to have a common due date that is linked with the calendar as a shared event between multiple cards as a "milestone" with its own colored label displayed on the card? I.e. some sort of way to link labels to CalDav events?

Reinventing the bug tracker? They're supposed to complement, not duplicate each other. You can probably do this already via webhooks from your bug tracker anyway.

poVoq commented 7 years ago

@9662: Regarding the first comment: maybe, but you might not want to spam your group-chat with all the file etc. changes, while deck and task updates might be more interesting.

Regarding the second: no, what have milestone dates to do with a bug-tacker? I think it is worth to have common event linked date labels on the cards so that it is quickly visible to the users what kind of common deadlines might be related to which cards.

juliusknorr commented 7 years ago

https://github.com/nextcloud/server/pull/2829 will allow apps to register custom sabre plugins, if this is in we could create our own CalDAV endpoint at /dav/deck that will allow users to subscribe to within their calendar apps.

Here is a short summary of what I planned for that endpoint:

Another possible integration would be to link cards to CalDAV task categories, so that if a user creates a new CalDAV task in an external application (lets say OpenTasks on Android) and chooses the right category for it, Deck automatically uses the name of that category to sort it to the card with the same name.

@poVoq That should be possible with the above solution.

Would it be possible to have a common due date that is linked with the calendar as a shared event between multiple cards as a "milestone" with its own colored label displayed on the card? I.e. some sort of way to link labels to CalDav events?

@poVoq This is a far more advanced feature. Let's just focus on the basics for now.

If subtasks become a thing in Deck, it can easily compete with whatever kanban system out there. Keeping the syncing with Tasks optional would be great imo.

@simonpostm That should not be a problem, if there will be a dedicated dav endpoint for the deck app.

Perhaps a functionality to make multiple decks if that is possible?

@simonpostma Not sure if I understand that correctly. Can you describe that a bit more?

XMPP group-chat notifications for activities would be also nice.

It is a reasonable idea, but it belongs to the notifications part of Nextcloud, not to Deck.

:+1:

Hope I didn't forgot to comment on something. :wink:

simonpostma commented 7 years ago

@juliushaertl

I uninstalled Deck because i need my kanban to have more features at this point in time (cant wait for the next update so i can drop my current Kanban service and start using Deck :D), hasty as i was i didn't remember that Deck already has the feature to make multiple boards. Sorry for that.

simonpostma commented 7 years ago

Is there any ETA on the next update? Not trying to pressure you, just can't wait to exchange kanbanflow with Deck

juliusknorr commented 7 years ago

Sorry for the delay, I've been quite busy this week. It is on my list for the upcoming week.

simonpostma commented 7 years ago

It's clear you're very busy. Do take your time! I'll be looking to donate some to you after it's released.

andreasjacobsen93 commented 7 years ago

I think we should explore more how deck and tasks can be integrated? I think it could result in some really valuable features.

poVoq commented 7 years ago

Any update on the CalDAV tasks and calendar integrations?

e-alfred commented 7 years ago

Would a Deck webdav endpoint be automatically added to the Calendar/Tasks app or do users have to manually add them?

juliusknorr commented 7 years ago

~nextcloud/server#2829~ will allow apps to register custom sabre plugins, if this is in we could create our own CalDAV endpoint at /dav/deck that will allow users to subscribe to within their calendar apps.

I've just updated the PR to https://github.com/nextcloud/server/pull/6835 to get this moving again.

Would a Deck webdav endpoint be automatically added to the Calendar/Tasks app or do users have to manually add them?

The only issue I see after digging a bit into the sabredav/Nextcloud dav code is, that we cannot easily add the boards to the list of a users calendars. Maybe we need some API for that on the server side. Without that you would need to add it manually.

juliusknorr commented 7 years ago

I took some time to dig into the Nextcloud dav app. Here are some notes about the planned implementation. Feedback is very welcome.

Implementation

Mapping VTODO -> Card

Open issues to discuss

calendar-home-set

Calendar collections cannot be added to the principals calendar-home-set. Maybe we need to extend Nextclouds CalendarHome::getChildren so apps can add their own entries to the home collection

Stack representation

Since nested calendar collections are not possible (something like deck-1/stack-1/card-1.ics) are not possible, we still need to figure out how we can represent the current stack in the caldav representation:

slowhand93 commented 7 years ago

First of all: thanks for your work Julius! I love Deck.

Regarding stack representation: I would prefer your second option because I use Deck to organize my days/weeks. So I often move cards between stacks. When I'm understanding you right, this wouldn't be possible if I will use the caldav feature?!

poVoq commented 7 years ago

Hmm... while not perfect, it might be doable to represent stacks via the priority value as usually the stacks are related to some sort of todo, backlog etc. system that is similar to priorities.

juliusknorr commented 7 years ago

@poVoq That could be a solution, either that or maybe we abuse the LOCATION field which is a string value so we could at least show the stacks name.

juliusknorr commented 7 years ago

I would prefer your second option because I use Deck to organize my days/weeks. So I often move cards between stacks. When I'm understanding you right, this wouldn't be possible if I will use the caldav feature?!

Another downside of that is that users would need to setup each stack individually in their calendar software, in case the program doesn't provide proper auto discovery (like thunderbird). I would rather prefer one board -> one calendar.

9662 commented 7 years ago

Will Deck calendars be generated/assigned on user demand?

My thinking is that not every deck needs a calendar system (not everyone uses due dates and the like) so the user would ideally have an option to have a calendar associated with a deck or not.

Likewise, if the calendar ↔ deck association could be user-configurable, then it may solve some of the issues mentioned above? E.g., as a user you may simply create one or more calendars in Nextcloud and then tell Deck which calendar to write to. This could be on a Deck-wide, per-deck or even per-card basis. I haven't thought this through but this approach may provide the greatest flexibility with relatively conservative development effort.

juliusknorr commented 7 years ago

Will Deck calendars be generated/assigned on user demand?

That is the current idea. We have a separate calendar for each board.

E.g., as a user you may simply create one or more calendars in Nextcloud and then tell Deck which calendar to write to.

That would be much more complicated since we would have both events from deck and events from the user in the calendar. Also we need to update every users calendar who the board has been shared with. So using an individual calendar is a much cleaner and easier solution.

E.g., as a user you may simply create one or more calendars in Nextcloud and then tell Deck which calendar to write to.

From the current implementation idea, the calendars would be a separate set of calendars from the default nextcloud ones, so it is easy to just not use it in your calendar client. Also I was thinking about allowing users to disable the dav integration per calendar.

In general the idea is that all tasks are exposed as VTODO entry, so they won't show up in your calendar unless the client supports that. There is an issue for the nextcloud calendar app at https://github.com/nextcloud/calendar/issues/28

juliusknorr commented 7 years ago

Also an update on the calendar-home-set, i have a WIP branch for the server here https://github.com/nextcloud/server/tree/dav-allow-multiple-homes

Support of that depends on the client, as it is alway an issue with CalDAV implementations. :wink: DAVdroid works quite nice, but some clients just use the first entry and ignore others.

9662 commented 7 years ago

Also I was thinking about allowing users to disable the dav integration per calendar.

Is that the same as this?

the user would ideally have an option to have a calendar associated with a deck or not.

As someone who has about 12 decks currently active (one per department / project), I am a bit concerned about potential overabundance of calendars in the Calendar Nextcloud app. ☺

bobbiz commented 6 years ago

hello everybody, thanks to everybody you are here Like Nextcloud, Like Calendar, Like Deck. Idea to add new events to my Calendar($DeckName) only, first. So here my alternative(maybe not) vision of implementation (pseudocode):

  1. Check/create calendar same name as Deck (untill true, maybe move this to createEventMethode).
  2. Need 2 methods: create event in callendar and delete event in calendar. 2.1. Create = function() { onButtonClick( new Event( $dueDate = not null, $name = $stackName . ' - ' . $cardName, $defaultNotification); lock/disable DueDateInput(); setCardEventCreatedOnce(showDeleteButton(); lockCreateButton(););)}; 2.2. Delete = function() { onButtonClick( unlock/enable DueDateInput(); checkEventExist($lockedDueDate, $name); deleteIfExist(); flipButtons();)}
  3. Write Activity / Log every steps listed before.

Deck will not control that Events at all. Dont punch me please. Need Links: CallDav API; Card Edit/View Methods; adding fields; how get authority to use one app from another in same account. Any help Apprisiated.

danicotillas commented 6 years ago

I would like to know if finally there is a way to link the card dates with the Calendar. Thanks!

GustavoMarcante commented 6 years ago

Hi. NextCloud is great! I'm using it as file storage and synchronization with my team of "non tech people" since before the fork and is becoming very stable now (both the software and the people habits to use it). Applications also is a great idea. But, in my point of view (based on my team feedback) having a lot of applications to do a lot of tasks can confuse more than help. Again, in my point of view, better than more applications would be to have them integrated. Researching an "integrated philosophy", I found Zenkit (proprietary). They have lists, kanban (deck), table, calendar (and also mindmaps) all integrated! GitLab Kanban Board (open source) is another example. Integration with Google Calendar (that many "non tech people" uses) also would be great. We have A LOT of tools for software development. I don't think NextCloud could compete in this front. But we have a "blank space" related to an open source integrated set of tools like that, to "non tech people" -- the people that is NOW learning to use NextCloud (I mean, not "Yet Another Redmine" kind of think). Sorry if I wrote too much, but I really like NextCloud and this integration I think would be great. I think this is related do #15, #31, #425 also.

Mannshoch commented 6 years ago

I would prefer to sort the deck/stack by Category. May a category could be upgraded to a Deck or Stack. In thunderbird it appear as normal Category

If I create a task in Thunderbird and don't add at least one Deck and Stack category you could put them in nextcloud/deck to a kind of "unsorted" deck .

The good point is, if I set a category on more then one deck I'm able to put a task into more then one deck. Sometimes there are tasks that belong to more than one project.

Mannshoch commented 6 years ago

Hmm... If I add two Deck Category maybe a drawer which contain the link to this Task on the other Deck would be interesting.

Mannshoch commented 6 years ago

Mockup: grafik

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

laurentiu2 commented 5 years ago

Moved here from #751 as requested.

I'd find useful to have the option 'Show in Calendar' under Due Date on Tasks, like in the image below.

screenshot 2019-01-04 at 13 07 52

The same with Deck. The entry in Calendar might be 'Deck/Board_name/Stack_name/Card_name' and the calendar might be the first one in the list - let's say 'default option'.

screenshot 2019-01-04 at 13 16 29

simonjaq commented 5 years ago

What's the status on this? We are using Deck for project management in our company and the feature to integrate with CalDAV would make it absolutely perfect. The main issue that we have with Deck is the impossibility to add tasks / cards on the go from mobile phones. We used to work with nextcloud tasks and 2do on iPhone synced over CalDAV to be able to quickly add tasks. The CalDAV integration could be very simple. For example by linking a stack (e. g. Incoming) with a calendar and by adding all tasks that are added to this calendar to the stack. How much bounty would be needed to get you working on this soon?

juliusknorr commented 5 years ago

@simonjaq Unfortunately there are no real news here. However if you use Nextcloud in a corporate environment and wish to have this feature implemented by Nextcloud GmbH, there is the option for sponsoring feature development work on top of your Nextcloud Enterprise subscription to get your features implemented. Feel free to get in contact via https://nextcloud.com/enterprise/buy/

Bountysource is rather a plattform to give some additional motivation for community contributors.

SzOr commented 5 years ago

@simonjaq Unfortunately there are no real news here. However if you use Nextcloud in a corporate environment and wish to have this feature implemented by Nextcloud GmbH, there is the option for sponsoring feature development work on top of your Nextcloud Enterprise subscription to get your features implemented. Feel free to get in contact via https://nextcloud.com/enterprise/buy/

Bountysource is rather a plattform to give some additional motivation for community contributors.

It would be THE BEST for the community, it is really a missing piece in the puzzle...

simonjaq commented 5 years ago

@simonjaq Unfortunately there are no real news here. However if you use Nextcloud in a corporate environment and wish to have this feature implemented by Nextcloud GmbH, there is the option for sponsoring feature development work on top of your Nextcloud Enterprise subscription to get your features implemented. Feel free to get in contact via https://nextcloud.com/enterprise/buy/

Bountysource is rather a plattform to give some additional motivation for community contributors.

Thanks. We are a small company and not running Nextcloud Enterprise. What about hiring an independent developer (or you Julius?) to implement this feature? As I am not a coder it's hard for me to estimate how much work this would mean. Are we speaking about days or weeks of work? From a non-coder perspective: Couldn't quite some of the functionality be taken from the Nextcloud Tasks app, which is well integrated with CalDAV?

juliusknorr commented 5 years ago

@simonjaq I'm not available for hiring, since I'm working for Nextcloud. However hiring an independent developer is of course also possible. Maybe searching the freelancer section in the forum is an option for that https://help.nextcloud.com/c/nextcloud-freelancing

From a non-coder perspective: Couldn't quite some of the functionality be taken from the Nextcloud Tasks app, which is well integrated with CalDAV?

This is a bit different, since tasks just used CalDAV as its main data source while deck has its own source in the database, which needs to be mapped to the existing CalDAV endpoint somehow.

baldstard commented 5 years ago

@juliushaertl

This is a bit different, since tasks just used CalDAV as its main data source while deck has its own source in the database, which needs to be mapped to the existing CalDAV endpoint somehow.

Any progress here?

And what about integration of Deck into Nextcloud Adnroid plugin? This could be a "starting workaround" until mapping will be done. Or not?

sehucke commented 5 years ago

And what about integration of Deck into Nextcloud Adnroid plugin? This could be a "starting workaround" until mapping will be done. Or not?

This depends on the underlying use cases this feature should support.

  1. As a user you want to use an existing (CalDAV-supporting) app to display a task list.
  2. As a user you want to use an existing (CalDAV-supporting) calendar app to visualize tasks and due dates.
  3. As a user you want to use a mobile device to access / work with your Kanban boards.

IMHO, this is a bit out-of-scope for a file sharing app like Nextcloud is. I would vote for a separate Android app that uses public Deck APIs to realize a mobile-friendly frontend. (As my main use case is (3.) :-) ) I would like to start such a project if I find the time...

poVoq commented 5 years ago

@sehucke Quite offtopic, but Kandroid would be a good starting point to extend with Deck support: https://github.com/andresth/Kandroid

putt1ck commented 5 years ago

@sehucke you mean something like https://f-droid.org/uk/packages/it.niedermann.nextcloud.deck/ ?

sehucke commented 5 years ago

@sehucke you mean something like https://f-droid.org/uk/packages/it.niedermann.nextcloud.deck/ ?

Exactly! :-) Shame on me that I overlooked this one...

The direct link to the repo: https://github.com/stefan-niedermann/nextcloud-deck

Many contributors are Nextcloud core team members. Looks very promising.

raimund-schluessler commented 4 years ago

Follow-up to the discussion in https://github.com/nextcloud/deck/pull/1319, regarding https://github.com/nextcloud/deck/pull/1319#issuecomment-591388534 and https://github.com/nextcloud/deck/pull/1319#issuecomment-591393001.

I think a possible way to map between Deck and CalDAV entities could be the following:

Deck CalDAV Tasks
Board VCALENDAR List
Stack VTODO without RELATED-TO property Root-Task
Card VTODO with RELATED-TO (UUID of the Root-Task / Stack) Subtask
Tags CATEGORIES or custom implementation (Nextcloud tagging system) Currently uses CATEGORIES, integration with Nextcloud tags would be better, see https://github.com/nextcloud/tasks/issues/89
Assigned users ATTENDEE or custom implementation ATTENDEE or custom implementation, see https://github.com/nextcloud/tasks/issues/72
Recurring stacks & cards RRULE Recurring tasks & subtasks, see https://github.com/nextcloud/tasks/issues/34
Attachments ATTACH or custom implementation ATTACH or custom implementation, see https://github.com/nextcloud/tasks/issues/91

Tags, assigning users, attachments and recurrence is not supported by Tasks yet either, but it would make much sense to implement these features. And if we see that it is not really possible to implement this with pure CalDAV I would be open to implement it without syncing it via CalDAV and have it only available in the webinterface. This would still be better than not having it at all in Tasks and would not limit Deck.

Also having recurring Stacks & Cards could be an interesting option, given that you can add due dates.

For Subsub(..)-Tasks one could show them as Subsub(..)-Cards in Deck or simply redirect to the Tasks app.

Let me know what you think @nextcloud/deck @nextcloud/calendar

juliusknorr commented 4 years ago

Thanks a lot for this valuable input @raimund-schluessler. I must admit I've not been thinking about using the RELATED-TO property for representing stacks, but this is a very nice idea.

Since we already have the possibility coming with Nextcloud 19 to expose calendars as an app, I think it makes most sense to tackle the whole CalDAV integration issue in separated milestones.

  1. Expose deck boards as VCALENDAR, try to map as much data from deck to the VTODO (read only access)
  2. Allow updating VCALENDAR entries, try to map as much as possible from vtodo to the deck database and store the rest as plain vtodo data, so we can still push it out over CalDAV (write access)
  3. Deck data could be moved to the DAV backend. I'm thinking about a similar API as https://github.com/juliushaertl/server/blob/5bf3d1bb384da56adbf205752be8f840aac3b0c5/lib/public/Contacts/IManager.php#L54 here. The frontend/apps would still access it though the rest api and have additional capabilties available in deck only that are not representable using CalDAV, but with this deck could also access existing calendars and their VTODO entries and wrap them into a board. We probably need to do some smart logic here to not end up with a board that has 1000 stacks for each first-level task, but that is something to discuss in detail later I'd say.

Step 3 will probably be the most crucial part here, since that means that we also need to migrate existing data and make sure that everything comes nicely together.

PhrozenByte commented 4 years ago

Having a CalDAV integration is crucial for us, so I was thinking a little bit about the integration... In Oct 2017 you guys were discussing about whether or not categories should be used for stacks. I'd strongly vote for it.

The reason is that you should keep in mind how a client, that isn't aware of a Kanban-style tasks list, would represent these tasks. Just think of the "demo board":

demo board

Creating a VTODO per card would create the tasks "Write a press release", "Take nice screenshots", "Write a blog" and "Think of a slogan". This is without any doubt what a user would expect. But also creating a VTODO per stack would also create the tasks "Todo", "In progress" and "Done". What are these tasks supposed to represent? Those tasks can't be assigned to anyone, they can't ever be completed, because that's not what stacks are for, and they will dangle around in every other CalDAV client.

Using CATEGORIES for stacks in contrast is more semantically correct: The card "Write a press release" gets the category "Todo", the cards "Take nice screenshots" and "Write a blog" the category "In progress" and the card "Think of a slogan" the category "Done". The relationship between multiple cards is represented by a category just perfect.

But what about tags? You're right, tags are also a good candidate for categories. Why not simply mix them? We could simply define a prefix like Stack: for CATEGORIES representing stacks, so the actual CATEGORIES property for the card "Write a press release" would end up being CATEGORIES:Stack: Todo,Pending. Any other CalDAV client would show these just fine. Even syncing back works: If one creates a new VTODO with the category Stack: Backlog, Deck could simply create a new stack "Backlog" and show the new card there.

Conflicts could be resolved on a best-effort basis: Adding multiple "stack categories"? Nextcloud shows it in the first one only and might also remove the conflicting category later (not immediately, as this might conflict with how clients add/remove categories). Adding no "stack category" to a new task? Either show it below a distinct "Unsorted" stack or move it to the first stack.

Ordering cards and stacks is beyond CalDAV anyway.

Fenrihr commented 4 years ago

I saw that Nextcloud 18 has the "Flow" function with similar characteristics to Deck ... so my question is: will there be advances in this function for Deck? Because i'm using the Snap version of Nextcloud, the 17.0.5 version for be exact.

juliusknorr commented 4 years ago

@Fenrihr Flow is something different, see #1722

laurentiu2 commented 4 years ago

didn't I moved it once? 50685757-26101a00-1023-11e9-8002-17d38f0c4962

maybe showing all calendars as a drop-down list?

animorphcoop commented 4 years ago

Thanks to everyone for continuing the development, we've just made a contribution via Bountysource supporting Deck&Calendar integration!