Skip to content

[ticket/17627] Carry topic views over when merging posts deletes the topic#7001

Open
ECYaz wants to merge 1 commit into
phpbb:3.3.xfrom
ECYaz:ticket/17627
Open

[ticket/17627] Carry topic views over when merging posts deletes the topic#7001
ECYaz wants to merge 1 commit into
phpbb:3.3.xfrom
ECYaz:ticket/17627

Conversation

@ECYaz

@ECYaz ECYaz commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Merging topics from the MCP forum view (merge_topics) has kept the highest view count of the merged topics since PHPBB-14795. Merging a whole topic into another one via the MCP topic view or the quickmod "Merge topic" option (merge_posts) never received the same treatment: when all of a topic's posts are moved and the emptied topic is deleted, its view count is silently lost.

This applies the established behaviour to merge_posts(): the destination topic takes the maximum of both topics' view counts, and only when the source topic was fully merged away. Partially merged topics keep their counts untouched. Using the maximum rather than the sum follows the explicit decision made in PHPBB-14795.

Covered by a new functional test that performs the full merge through the MCP and asserts the destination topic inherits the higher view count once the source topic is gone.

Checklist:

  • Correct branch: master for new features; 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.3.x
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17627

…topic

The MCP merge topics action already keeps the highest view count of the
merged topics (PHPBB-14795), but merging all of a topic's posts into
another topic via the MCP topic view left the destination topic's view
count untouched, losing the merged topic's views.

PHPBB-17627
@github-actions

Copy link
Copy Markdown

The attempt to merge branch 3.3.x into master has completed after considering the changes in this PR.

  • Merge result: Success ✅

This PR is ready to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant