How to rest multiple topics bump date
I don’t know what the use case is, but it seems to me, as far as with using the web UI, it would be easy enough to reset the bump date of individual topics when they were bumped. I’m not seeing how “bulk bump date reset” would ever be needed let alone a common enough need for it to need to have a UI.
Anyway, if you’ve somehow managed to get in a situation where you want to work in bulk, it should be possible to do using the CLI
Thanks for the reply.
I use a bot to fetch RSS blog/Podcast to Discourse, when the feed changed, the topics will be updated automatically and bump up. I have to reset one by one so I think it’s should be better if I can bulk reset.
What do you means CLI? Bulk reset via the database? Thanks.
I was looking for this feature just now.
It’s needed because I was tidying and re-arranging things on my forum, and a load of old posts got bumped to the top. Now I have to go into each one and reset the bump date.
https://github.com/discourse/discourse/blob/master/app/models/topic.rb
If, repeat, if I’ve read it correctly the Topics table has a bumped_at
field that is a datetime, not null, its initial not null value is the created_at
not null value. AFAIK, the datetime is whatever Ruby now
gets.
I think if you determine as best as you can
- what there was immediately prior
- what exactly you did
- what you want to accomplish
there will be a good chance you can put together a query. How many is a “load”? If it’s a one-time it might be better to just slog it out.
(Unfortunately there is no “prior_to_bump_date” field )
Me too!
How does one reset the bump date manually from the rails console? Revert bumped_at
to the updated_at
for the topics in question?