From 200cebabca2152925920528152b8481bcee29b49 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Sun, 30 Nov 2025 08:37:10 +0100 Subject: [PATCH] Fix cloning poll # 4393 Signed-off-by: dartcafe --- CHANGELOG.md | 1 + lib/Service/OptionService.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aa3034fa5..22f4d8c807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. ## [unreleased] ### Fixed - Changed sql query to be ansi safe + - Cloning polls ### Added - Show locale date as tooltip for relative date time information diff --git a/lib/Service/OptionService.php b/lib/Service/OptionService.php index 330056d0ae..f5572c367d 100644 --- a/lib/Service/OptionService.php +++ b/lib/Service/OptionService.php @@ -332,7 +332,9 @@ public function shift(int $pollId, int $step, string $unit): array { */ public function clone(int $fromPollId, int $toPollId): void { $this->pollMapper->get($fromPollId) - ->request(Poll::PERMISSION_POLL_ACCESS) + ->request(Poll::PERMISSION_POLL_ACCESS); + + $this->pollMapper->get($toPollId) ->request(Poll::PERMISSION_OPTION_ADD); foreach ($this->optionMapper->findByPoll($fromPollId) as $origin) {