Skip to content

[FIX] Forum: Recalculate counters of copied forums [trunk] - #12502

Merged
mjansenDatabay merged 4 commits into
ILIAS-eLearning:trunkfrom
marvin-matuschek:fix/13/forum-copy-counters
Dec 4, 2026
Merged

mjansenDatabay merged 4 commits into
ILIAS-eLearning:trunkfrom
marvin-matuschek:fix/13/forum-copy-counters

Conversation

@marvin-matuschek

Copy link
Copy Markdown
Contributor

This PR belongs to #12468

Copying a forum kept the source counters and then incremented them again for every new thread and post. The thread overview then showed empty pages. A migration recalculates the counters of existing forums.

Copying a forum kept the source counters and then incremented them again for every new thread and post. The thread overview then showed empty pages. A migration recalculates the counters of existing forums.
@marvin-matuschek
marvin-matuschek force-pushed the fix/13/forum-copy-counters branch from 334a001 to 11d081a Compare December 1, 2026 14:49
…ated counts

Join thread and post totals once and store missing counts as zero.
@marvin-matuschek
marvin-matuschek marked this pull request as ready for review December 1, 2026 14:55
The copy relied on the thread's post counter, which is never loaded and always 0, so every copied thread got a visible first posting. Whether the source thread has a first visible posting now decides this instead. The copy also gets its own creation date and the copying user as author, instead of the source forum's values.
@marvin-matuschek
marvin-matuschek force-pushed the fix/13/forum-copy-counters branch from d88e161 to 50806ea Compare December 2, 2026 16:14
@mjansenDatabay
mjansenDatabay merged commit e188d38 into ILIAS-eLearning:trunk Dec 4, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants