Summarise This Topic not working for parameters smaller than 50

Hi,

I want to summarise topics with more than 20 posts. I changed this value summary posts required in settings to 20 even after that the Summarize This Topic button does not appear.

However, it’s working fine for the value 50.

Please let me know if I’m doing something wrong.

Thanks!

1 Like

Can we repro this @tshenry?

1 Like

I’m getting a weird déjà vu here, but can’t find any previous discussion. In any case, my understanding is that changing this setting does not result in an instantaneous retroactive change.

The Summarize This Topic button will be added to all topics that meet the criteria as a result of a scheduled job. It looks like for recent topics, it should update them within 15 minutes of changing the setting. For older topics, within a week. If anyone wants to make the change right away, it appears triggering a rebuild will do the trick.

Also good to keep in mind the summary likes required site setting will also control whether or not a topic is summarized.

Can you let me know if you are seeing anything contrary to the above @Shubham_Ranjan?

@codinghorror, do you think it might be worth adding a note to the setting that informs admins that it may take up to a week for all posts to be updated?

4 Likes

Oh yes definitely, I wasn’t even aware! Will the topics actually get updated? I’m unclear what the “update” process even is in this case.

1 Like

Assuming I correctly followed all off the twists and turns in the code, here’s what I found:

We have a ScoreCalculator class that uses the two settings (summary likes required and summary posts required) to determine whether the topic should be summarized:
https://github.com/discourse/discourse/blob/master/lib/score_calculator.rb#L88-L89

That ScoreCalulator class will be called in the PeriodicalUpdates job that runs every 15 minutes to check against topics that meet the specified arguments:

https://github.com/discourse/discourse/blob/master/app/jobs/scheduled/periodical_updates.rb#L22-L25

All other topics should be covered by the Weekly job with:

https://github.com/discourse/discourse/blob/master/app/jobs/scheduled/weekly.rb#L11

Any particular preference for the copy of the setting description? Maybe something like:

I guess another alternative would be to run the score calculation upon saving the setting.

3 Likes

Sure go for that copy! Looks good. We’ve definitely hit rule of three on this one. I didn’t even know!

2 Likes

Done!

https://github.com/discourse/discourse/commit/617692a6c43a21b0c158f3cea53f1142b4a35195

3 Likes

This topic was automatically closed after 5 days. New replies are no longer allowed.