Skip to content

Commit

Permalink
Change all clarifications in thread
Browse files Browse the repository at this point in the history
By always finding the first in thread and changing the replies
afterwards. Verified that this also works via the overview clarification
page.
  • Loading branch information
vmcj committed Nov 23, 2023
1 parent 8d73e77 commit 9e0b35d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion webapp/src/Controller/Jury/ClarificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,17 @@ public function changeQueueAction(Request $request, int $clarId): Response
if ($queue === "") {
$queue = null;
}
$clarification->setQueue($queue);

// Either this is the first in a thread (of 1 or more) or this 2nd or more.
$firstClarification = $clarification->getInReplyTo();
$curClarification = $clarification;
if ($firstClarification) {
$curClarification = $firstClarification;
}
foreach ($curClarification->getReplies() as $reply) {
$reply->setQueue($queue);
}
$curClarification->setQueue($queue);
$this->em->flush();

if ($request->isXmlHttpRequest()) {
Expand Down

0 comments on commit 9e0b35d

Please sign in to comment.