Skip to content

[stable21] Add repair job to delete calendar subscriptions that were orphaned when deleting an user - #30006

Closed
backportbot-nextcloud[bot] wants to merge 2 commits into
stable21from
backport/28716/stable21
Closed

[stable21] Add repair job to delete calendar subscriptions that were orphaned when deleting an user#30006
backportbot-nextcloud[bot] wants to merge 2 commits into
stable21from
backport/28716/stable21

Conversation

@backportbot-nextcloud

@backportbot-nextcloudbackportbot-nextcloudBot commented Dec 1, 2021

Copy link
Copy Markdown

backport of #28716

@backportbot-nextcloudbackportbot-nextcloudBot added this to the Nextcloud 21.0.8 milestone Dec 1, 2021
@tcitworldtcitworld added the feature: caldav Related to CalDAV internals label Dec 17, 2021
This was referenced Jan 7, 2022
@skjnldsvskjnldsv added the 2. developing Work in progress label Jan 7, 2022
@MichaIng

This comment has been minimized.

@MichaIng
MichaIngforce-pushed the backport/28716/stable21 branch from a008686 to 43d9936CompareJanuary 12, 2022 19:37
@MichaIngMichaIng added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 14, 2022
@MichaIng
MichaIngforce-pushed the backport/28716/stable21 branch from 43d9936 to a4245efCompareJanuary 14, 2022 18:22
@skjnldsvskjnldsv mentioned this pull request Jan 20, 2022
9 tasks
@skjnldsv
skjnldsv requested review from a team, MichaIng, PVince81, icewind1991 and skjnldsv and removed request for a teamJanuary 20, 2022 09:41
@skjnldsvskjnldsv mentioned this pull request Jan 25, 2022
8 tasks
@blizzz

Copy link
Copy Markdown
Member

still waiting for a second review

@blizzzblizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 14, 2022
$qb = $this->connection->getQueryBuilder();
$qb->delete('calendarsubscriptions')
->where($qb->expr()->eq('id', $qb->createNamedParameter($orphanSubscriptionID)))
->executeStatement();

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.

only available from NC 22

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.

Suggested change
->executeStatement();
->execute();

$qb->method('createNamedParameter')->willReturn($this->createMock(IParameter::class));
$qb->method('where')->willReturn($qb);
// Only when user exists
$qb->expects($this->exactly($deletions))->method('executeStatement');

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.

Suggested change
$qb->expects($this->exactly($deletions))->method('executeStatement');
$qb->expects($this->exactly($deletions))->method('execute');

@MichaIngMichaIng added 2. developing Work in progress and removed 4. to release Ready to be released and/or waiting for tests to finish labels Feb 14, 2022
tcitworldand others added 2 commits February 15, 2022 00:36
deleteding an user
Follow-up to #28419
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@MichaIng
MichaIngforce-pushed the backport/28716/stable21 branch from 0038a69 to 3e7b3ceCompareFebruary 14, 2022 23:36
@blizzzblizzz closed this Mar 21, 2022
@ChristophWurst
ChristophWurst deleted the backport/28716/stable21 branch March 21, 2022 15:15
@ChristophWurst

Copy link
Copy Markdown
Member

We decided it isn't worth the risk backporting this change.

@MichaIngMichaIng removed this from the Nextcloud 21.0.10 milestone Mar 21, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developingWork in progressbugfeature: caldavRelated to CalDAV internalsfeature: dav

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@MichaIng@blizzz@ChristophWurst@miaulalala@skjnldsv@tcitworld