「훌륭한 답변」 부여 날짜가 실제로는 게시 날짜입니다

https://community.wanikani.com/ 에서 누군가 제 게시물에 '좋아요’를 눌렀다는 알림을 받았고, 이어 ‘훌륭한 답변’ 배지 획득 알림이 왔습니다. 해당 '좋아요’는 실제로 그 게시물의 50번째 '좋아요’였습니다. 하지만 배지 획득 날짜는 5일 전으로 표시되어 있습니다. 이런 현상은 이전에 최소 한 번 더 본 적이 있습니다.

제가 이 게시물을 작성한 지 5일이 되었습니다. 하지만 배지 '부여 날짜’는… 음, 실제로 부여된 시점을 기준으로 해야 하지 않을까요? 그래서 이 문제를 Contribute > Bug 카테고리에 올렸습니다. 의도된 동작이라면 알려주시면 감사하겠습니다.

6개의 좋아요

The Great Reply badge query is using the post’s updated_at column to set when the badge was granted. Liking a post does not reset its updated_at value, so granted at will be set to the post’s creation date, or to the last time the post was edited.

We have a few other queries that are triggered when a user acts on a post that set the granted at time in the same way. For badges where the query is run once daily, for example the Famous Link badge, current_timestamp is used to set granted_at. Could a similar approach be used for queries that are triggered when a user acts on a post?

8개의 좋아요

Sure this is a simple enough change. Date will not be fixed historically but going forward it should be a little bit saner.

https://github.com/discourse/discourse/commit/58d6ee36ee460e2f7f5da0121dcbaa7929b7d7d5

6개의 좋아요