Badge granted when topic created


(Emanuelle J) #1

When I got a nice topic badge, it said that it was granted 16 hours ago, which was when I created the topic.

I did not receive the badge 16 hours ago, it hit 10 likes a few minutes ago.


(Jeff Atwood) #2

What is the desired behavior here @sam?


(Sam Saffron) #3

Desired is 10th like but it’s technically very expensive to find the 10th like so you have the date


(Rafael dos Santos Silva) #4

Is this the minutely BadgeGranter job? What about using CURRENT_TIMESTAMP for the date?


(Sam Saffron) #5

That works but does not work for backfills (which are always running and fixing stuff) and you end up having an inconsistent badge grant date.

Example edge case:

  • You are granted badge
  • Someone deletes topic
  • You are ungranted badge
  • Someone undeletes topic
  • You are granted the badge at a completely different date

(Rafael dos Santos Silva) #6

I would argue that it’s better that way, even on this edge case, because people would understand that the grant occurred when the system saw the topic was back.

Like I think it’s better to grant on job execution because people would understand that the system checks are periodic.

This map to know stuff on a lot of real and virtual stuff: bank system payments on weekend show as monday, MMO RPG granting a quest or achievement on a later date etc.

But I digress. Don’t want to bike-shed more :smile:.