Skip to content

Refactor the Badge System #279

Description

@adamzev

Is your feature request related to a problem? Please describe.
Currently, badges are a calculated aggregate rather than their own model. This can lead to issues such as:

  • The year a badge was earned will change when the current year is modified
  • Modifying the business logic regarding badges will cause previously earned badges to change
  • There is no model in which to store the date a badge was earned

Describe the solution you'd like
Create a model for Badges that stores badge when they are earned. Visiting the badge page will check if any new badges have been earned and will show any new badges along with any existing ones.

Additionally, while there is a model that stores the current year, there is no model which stores all possible years. It should be explored whether there should be a table of possible years and if any additional fields are determined by year (such as a different intro) and whether existing int4 references to years should be changed to foreign keys.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backburnerAn issue not required for the current stage of development of the projectbeenhancementNew feature or requestneeds-designNeeds clarification on design/layoutprofile-badges

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions