Commit Graph

7 Commits

Author SHA1 Message Date
Gerhard Schlager 8e8e773e65
FIX: Use `default_enabled` for badges (#212)
because `enabled` in Badge.seed will always overwrite changes by admins
2022-11-24 14:08:39 +01:00
Gerhard Schlager 882dd61e11 FEATURE: Add new badges and rename existing badges 2022-11-23 11:07:49 +01:00
Gerhard Schlager d6c8089ca3 FIX: Use generic, static names for badges
This is necessary, because seeding badges with a translated name will result in duplicate badges whenever the default locale changes. The static name solves this.
Moreover, it's not necessary to set the description during seeding. The serializer will localize the names and descriptions at runtime.

The DB migration tries to rename the existing badges by looking them up by their translated time.
2022-11-23 11:07:49 +01:00
Gerhard Schlager 747fb0c334 FIX: Badges shouldn't be editable 2022-11-23 11:07:49 +01:00
Gerhard Schlager 865433c0a7 PERF: Improve query for "Helpdesk" badge
The old query could be extremely slow and resource intensive.
This also switches `granted_at` from the post's creation date to the date when the post was marked as solution.
2022-11-23 11:07:49 +01:00
Gerhard Schlager bbb3212258 PERF: Improve query for "Tech Support" badge
The old query could be extremely slow and resource intensive.
This also switches `granted_at` from `current_timestamp` to the date of the most recent accepted answer for each user.
2022-11-23 11:07:49 +01:00
Krzysztof Kotlarek 230c2071ea
FEATURE: Add helpdesk and tech support badges (#84)
* FEATURE: Add helpdesk and tech support badges

When plugin is installed, we should create helpdesk and tech support
badges.

Both badges should be disabled by default
2020-02-05 11:14:12 +11:00