How to reset multiple topics bump date

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.

방금 이 기능을 찾고 있었습니다.

포럼에서 정리하고 항목을 재배열하던 중 오래된 게시물들이 대량으로 맨 위로 올라와 버렸거든요. 이제 하나하나 들어가서 날짜를 초기화해야 합니다.

https://github.com/discourse/discourse/blob/master/app/models/topic.rb

제가 제대로 읽었다면, 다시 한번 말하지만, Topics 테이블에는 bumped_at이라는 datetime 타입의 필드가 있으며, 이 필드는 not null이고, 초기 not null 값은 created_at의 not null 값입니다. 제가 아는 한, 이 datetime 값은 Ruby의 now가 반환하는 값입니다.

최선을 다해 다음 사항들을 파악하신다면

  • 바로 직전의 상태가 무엇이었는지
  • 정확히 무엇을 수행했는지
  • 무엇을 이루고자 하는지

쿼리를 작성할 가능성이 높을 것입니다. "많은 양(load)"은 어느 정도를 의미합니까? 일회성 작업이라면 그냥 끈기 있게 처리하는 것이 더 나을 수도 있습니다.

(불행히도 prior_to_bump_date라는 필드는 없습니다 :sadpanda: )

저도 마찬가지입니다!

rails 콘솔에서 수동으로 올라온 날짜를 초기화하는 방법은 무엇인가요? 해당 토픽들의 bumped_at을 updated_at으로 되돌리면 될까요?