Skip to content

feat: OCS Calendar Import - #55178

Merged
SebastianKrupinski merged 1 commit into
masterfrom
feat/calendar-import-export-ocs
Aug 14, 2026
Merged

feat: OCS Calendar Import#55178
SebastianKrupinski merged 1 commit into
masterfrom
feat/calendar-import-export-ocs

Conversation

@SebastianKrupinski

@SebastianKrupinski SebastianKrupinski commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

Summary

Extracted from #49995

This adds the ability to export and import calendars via the OCS

OCS Import

Endpoint: /ocs/v2.php/calendar/import
Request: POST

{
	"transaction": "random string",
	"target": "personal",
	"options": {
		"format": "xcal", (optional "ical, jcal, xcal", defaults to "ical")
		"validation": 0, (0 - no validate, 1 - validate and skip, 2 - validate and error)
		"errors": 0, (0 - continue, 1 - fail)
		"supersede": true,
	},
	"user": "user1", (optional admin permissions required)
	"data": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><calendar><event><title>Meeting</title><date>2025-02-18</date></event></calendar>"
}

Checklist

@SebastianKrupinski
SebastianKrupinski requested a review from a team as a code owner September 18, 2025 19:28
@SebastianKrupinski
SebastianKrupinski requested review from CarlSchwan, icewind1991 and nfebe and removed request for a team September 18, 2025 19:28
@SebastianKrupinski SebastianKrupinski self-assigned this Sep 18, 2025
@SebastianKrupinski SebastianKrupinski added the 2. developing Work in progress label Sep 18, 2025
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch from 12ad7af to 6838bbe Compare September 23, 2025 00:15
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch 3 times, most recently from e000a47 to a3431ef Compare September 23, 2025 00:57

@provokateurin provokateurin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code comments in the controller are a bit useless, you might want to remove them to avoid confusion if the code is refactored later.

Comment thread apps/dav/lib/Controller/CalendarExportController.php Outdated
Comment thread apps/dav/lib/Controller/CalendarExportController.php Outdated
Comment thread apps/dav/lib/Controller/CalendarImportController.php Outdated
Comment thread apps/dav/lib/Controller/CalendarExportController.php Outdated
Comment thread apps/dav/lib/Controller/CalendarImportController.php Outdated
Comment thread apps/dav/lib/Controller/CalendarImportController.php Outdated
Comment thread apps/dav/lib/Controller/CalendarExportController.php Outdated
Comment thread apps/dav/lib/Controller/CalendarImportController.php Outdated
Comment thread lib/public/AppFramework/Http/StreamGeneratorResponse.php Outdated
Comment thread lib/public/AppFramework/Http/StreamGeneratorResponse.php Outdated
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch from a3431ef to 3e048d5 Compare October 15, 2025 23:53
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch from 2ac397f to 20a731c Compare October 19, 2025 18:23
@SebastianKrupinski SebastianKrupinski added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 7, 2026
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch from 20a731c to 0ad93ad Compare June 9, 2026 21:25
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch from 0ad93ad to 56838c2 Compare June 10, 2026 16:31
@github-project-automation github-project-automation Bot moved this to 🏗️ In progress in 💌 📅 👥 Groupware team Jun 10, 2026
@SebastianKrupinski SebastianKrupinski changed the title feat: OCS Calendar Export + Import feat: OCS Calendar Import Jun 10, 2026
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch 2 times, most recently from 45970d0 to 0ea9465 Compare June 10, 2026 18:24
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch 6 times, most recently from 6631397 to d0e8053 Compare June 12, 2026 19:22
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch from d0e8053 to 4d7c277 Compare July 14, 2026 14:06
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch from 4d7c277 to 085f3d4 Compare July 14, 2026 17:35

use JsonSerializable;

interface ImportEvent extends JsonSerializable {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was already discussed to be removed in back ports

* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCP\AppFramework\Http;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

new public API. this is going to be messy in the backport.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Move the class into the private namespace, as discussed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That discussion was for the back ports not the master

@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch 2 times, most recently from eb471ec to e31ae56 Compare August 4, 2026 13:33

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐘

@DerDreschner DerDreschner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🐘 But tested it a month ago and was working there beside some issues that might be on my side, so 😄

@DerDreschner DerDreschner mentioned this pull request Aug 13, 2026
7 tasks
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/calendar-import-export-ocs branch from e31ae56 to 06ea390 Compare August 13, 2026 12:42
@SebastianKrupinski
SebastianKrupinski merged commit 4fcbb98 into master Aug 14, 2026
199 checks passed
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Aug 14, 2026
@SebastianKrupinski
SebastianKrupinski deleted the feat/calendar-import-export-ocs branch August 14, 2026 01:13
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable34

public function callback(IOutput $output): void {

foreach ($this->generator as $chunk) {
print($chunk);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is it printing to stdout and not in the passed IOutput instance?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because no one flagged this as an issue...

I also just realized that this class now needs to be removed... because someone added the exact same functionality in

https://github.com/nextcloud/server/blob/master/lib/public/AppFramework/Http/StreamTraversableResponse.php

This is what happens when PR sit around for a year 🤦

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

Labels

3. to review Waiting for reviews

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

5 participants