Skip to content

Commit

Permalink
Change the queue for all clarifications in the set of clarifications+…
Browse files Browse the repository at this point in the history
…replies

By always finding the first clarification and changing the replies
afterwards. Verified that this also works via the overview clarification
page.

In the UI this looks like a thread but this is not true in the database.
A team clarification will always be the first clarification, in case the jury
sends a clarification and the team responds this will be a new clarification (but quoted
with the earlier messages)

Verified nows also that when a team sends a clarification and jury responds and team responds
that this gives 3 clarifications where 2 are connected (team->jury)(->team).

Co-authored-by: Nicky Gerritsen <[email protected]>
  • Loading branch information
vmcj and nickygerritsen committed Nov 24, 2023
1 parent 22480c5 commit aa4f8ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion webapp/src/Controller/Jury/ClarificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,13 @@ 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.
$curClarification = $clarification->getInReplyTo() ?? $clarification;
foreach ($curClarification->getReplies() as $reply) {
$reply->setQueue($queue);
}
$curClarification->setQueue($queue);
$this->em->flush();

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

0 comments on commit aa4f8ba

Please sign in to comment.