"Great Reply" granted date is actually the date of the post

On https://community.wanikani.com/ I got a notification that someone liked my post, following by a “great reply” notification. This like was indeed the 50th like for that post. However, it says I earned the “great reply” badge 5 days ago. I’ve seen this happen at least one time before.

image

image

I made this post 5 days ago, but I would think the badge “grant date” should be based on… well, when it was granted, which is why I put this under #bug. If this is intended, just let me know.

6 Likes

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 Likes

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 Likes