Making WordPress.org

Opened 5 years ago

Closed 5 years ago

#4972 closed defect (bug) (fixed)

Move closed topics out of "Unresolved topics"

Reported by: felipeloureirosantos's profile felipeloureirosantos Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: Support Forums Keywords: has-patch
Cc:

Description

There are closed topics on https://wordpress.org/support/view/support-forum-no/

That also applies to the international forums: https://br.wordpress.org/support/view/support-forum-no/

Attachments (1)

4972.diff (599 bytes) - added by valentinbora 5 years ago.
Add extra filter for "post_status" => 'publish' on support-forum-no view

Download all attachments as: .zip

Change History (15)

@valentinbora
5 years ago

Add extra filter for "post_status" => 'publish' on support-forum-no view

#1 @valentinbora
5 years ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in Slack in #forums by valentinbora. View the logs.


5 years ago

#3 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @dd32
5 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 9477:

Support Forums: Only show non-closed topics in the Unresolved Topics listing.

Props valentinbora.
Fixes #4972.

#5 @dd32
5 years ago

Makes sense, I didn't apply this to the Resolved or Not A Support question views, since it feels like they should be there.

#6 follow-up: @felipeloureirosantos
5 years ago

Thank you for that, @valentinbora @dd32!

@dd32 I don't think that it has been applied on the international forums, right? In this case, could we do that?

#7 in reply to: ↑ 6 ; follow-up: @dd32
5 years ago

Replying to felipeloureirosantos:

@dd32 I don't think that it has been applied on the international forums, right? In this case, could we do that?

It should have, the code is shared.

#8 in reply to: ↑ 7 @dd32
5 years ago

Replying to dd32:

Replying to felipeloureirosantos:

@dd32 I don't think that it has been applied on the international forums, right? In this case, could we do that?

It should have, the code is shared.

Confirmed that it did.
The SQL from the BR site now reads:

( wp_postmeta.meta_key = 'topic_resolved' AND wp_postmeta.meta_value = 'no' )
) AND wp_posts.post_type = 'topic' AND ((wp_posts.post_status = 'publish'))

#9 follow-up: @felipeloureirosantos
5 years ago

This topic is available on this page (and it's closed): https://br.wordpress.org/support/topic/alteracao-de-quebra-de-texto/

All the topics that have more than 6 months (with no activity) are automatically closed, and should not be on this list.

Last edited 5 years ago by felipeloureirosantos (previous) (diff)

#10 in reply to: ↑ 9 @dd32
5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to felipeloureirosantos:

All the topics that have more than 6 months are automatically closed, and should not be on this list.

Ah, that's a little different, the topics aren't marked as closed in the database, but rather through a run-time filter, so the query doesn't exclude them.

We can probably extend it to respect the automatically-closed-at thresholds too.

Last edited 5 years ago by dd32 (previous) (diff)

#11 follow-up: @felipeloureirosantos
5 years ago

Is it better changing the approach for automatically closed topics (and marking them as closed) or just change the list filters?

I suppose that it would need a different ticket if we want to change how the auto-closing process works (instead of the list), right?

#12 in reply to: ↑ 11 @dd32
5 years ago

Replying to felipeloureirosantos:

Is it better changing the approach for automatically closed topics (and marking them as closed) or just change the list filters?

I suppose that it would need a different ticket if we want to change how the auto-closing process works (instead of the list), right?

I'd have to look at the code to figure that out, I think it might be a core bbPress filter that does it, so we'd effectively be duplicating it's functionality either way.

That's why I thought it might just be easier to respect the same bbPress date options and apply it as a filter here.. but that also depends upon what impact it has upon query performance, if the added date restriction makes it much slower it might be worth investigating alternatives.

#13 @felipeloureirosantos
5 years ago

IIRC, this list https://wordpress.org/support/view/no-replies/ has a filter that all topics might need to have 3 weeks or less, so maybe we can see how it works there.

I am not a developer personally, so I don't think that I'll be really helpful here, but I will be around if there is something that I can help with.

#14 @dd32
5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 9479:

Support Forums: Unresolved Topics: Attempt to exclude threads which have been auto-closed after 6 months.

Fixes #4972.

Note: See TracTickets for help on using tickets.