https://sourceforge.net/p/allura/discussion/general/ has several problems:
- negative post counts
- some post counts of 2, but actually just 1 post there.
- we haven't replied
- many have just a title - is that right? or should we require a description?
- lack of post makes the 'last post' column empty sometimes too
Diff:
I deleted our threads with 0 posts, so we don't have examples in prod any more
forge:tv/2461
Negative/incorrect post counts
Added unit and functional tests for this. To test, login to allura as an admin, go to Discussion tool and create a new topic, and then add a 2nd post to the topic. Go to Moderate screen, use the Any filter, check the box next to one of your posts, and click Spam Marked. Do this a couple more times, using the same post each time. Now go to the index page and confirm that the post count for the topic is 1.
Repeat the above steps, only this time mark the same post as Approved a few times, then go to the index page and make sure the post count is 2.
Threads listed even though they have no posts
Added functional tests for this. New behavior is that threads with all spam posts will not be listed in the index, and threads with zero posts will be deleted.
To test, use an existing topic or create a new one, go to the Moderate screen, and mark all the posts in the topic as spam. Confirm that the topic no longer appears in the Recent Topics sidebar, and does not appear on the Discussion index page or the forum index page. Now go back to Moderate, approve the posts, and confirm that the topic reappears.
Now go back to Moderate, delete all the posts, confirm that the topic disappears, and that the posts are no longer available on the Moderate screen.
Before merging this, also test [#2522] - it's on forge:tv/2461 b/c I did the work in tandem with this ticket.
Related
Tickets:
#2522Looked good, tested fine, merged to dev.