Skip to content

[FIX] Forum: Recalculate counters of copied forums [release_12] - #12501

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

mjansenDatabay merged 4 commits into
ILIAS-eLearning:release_12from
marvin-matuschek:fix/12/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.

@iszmais iszmais left a comment

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.

LGTM 👍

@marvin-matuschek
marvin-matuschek marked this pull request as draft December 1, 2026 09:12
@iszmais

iszmais commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@marvin-matuschek One small comment: Please fix the code style in your new made class. (See pipeline fails)

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/12/forum-copy-counters branch from 4b2cc87 to b4b1472 Compare December 1, 2026 14:48
…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/12/forum-copy-counters branch from 51178a1 to b43bbca Compare December 2, 2026 16:13
@mjansenDatabay
mjansenDatabay merged commit 6fc7c07 into ILIAS-eLearning:release_12 Dec 4, 2026
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.

4 participants