Skip to:
Content

bbPress.org

Opened 4 years ago

Closed 3 years ago

Last modified 8 months ago

#2838 closed defect (fixed)

Forum, topic, and reply counts alongside pending topics and replies

Reported by: netweb Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: trunk
Component: Component - Any/All Keywords: has-unit-tests
Cc:

Description

Migrating here from the originally reported issue raised in #meta1140

https://meta.trac.wordpress.org/raw-attachment/ticket/1140/forum.png

https://meta.trac.wordpress.org/raw-attachment/ticket/1140/pending.png

https://meta.trac.wordpress.org/raw-attachment/ticket/1140/topic.png

Attachments (1)

2838-tests-01.diff (5.8 KB) - added by netweb 4 years ago.

Download all attachments as: .zip

Change History (8)

#1 @netweb
4 years ago

In [bbPress5870]:

Tests: Add topic voice count test test_bbp_get_topic_voice_count_with_pending_reply().

This test tests the voice count of a topic to ensure replies with post status pending are not included in the voice count until approved.

#2 @netweb
4 years ago

In [bbPress5871]:

Tests: Add forum last active id test test_bbp_get_forum_last_active_id_with_pending_reply().

This test tests the forums last active id to ensure replies with post status pending are not used as the forums last active id until the reply is approved.

@netweb
4 years ago

#3 @netweb
4 years ago

The 2838-tests-01.diff patch is the first in a series of failing unit tests that should pass to resolve this ticket.

This patch covers bbp_get_topic_freshness_link() and the following reply actions:

  • bbp_trashed_reply()
  • bbp_untrashed_reply()
  • bbp_spammed_reply()
  • bbp_unspammed_reply()
  • bbp_approved_reply()
  • bbp_unapproved_reply()

#4 @netweb
4 years ago

In 5880:

Replies: In bbp_update_reply_walker() always update the topics last active time with bbp_update_topic_last_active_time() regardless of reply's published status.

This changeset including unit tests ensures that when calling reply actions spam/unspam, trash/untrash, approve/unapprove the reply's parent topic's last active time is updated to the time of the last published reply.

Props netweb. See #2838

#5 @netweb
4 years ago

  • Milestone changed from Under Consideration to 2.6

#6 @netweb
3 years ago

  • Keywords has-unit-tests added; needs-testing needs-unit-tests removed
  • Resolution set to fixed
  • Status changed from new to closed

#7 @johnjamesjacoby
8 months ago

Assigning all closed & unassigned tickets in the 2.6 milestone to myself.

Note: See TracTickets for help on using tickets.