con2 / kompassi

Kompassi Event Management System
https://kompassi.eu
Other
26 stars 27 forks source link

As the treasurer I need each expense claim to have a receipt number I can refer to in bookkeeping #413

Closed japsu closed 7 months ago

japsu commented 7 months ago

Alternative ways of implementation:

  1. A dimension value can be designated as ”triggers numbering”. When that dimension value is added to a response, the response receives the next unallocated number.
    • Pros: automatic allocation of numbers, happens precisely at the correct time (when expense claim is approved)
    • Cons: rather specific, difficult to envision other use cases that could use this, conceptually difficult
  2. Always give each response to a survey a sequential number that is consecutive and unique within that survey.
    • Pros: conceptually simple, may have other uses as well (easy to determine who came before whom)
    • Cons: holes in numbering for rejected expense claims, somewhat involved to implement (can't use GENERATED ALWAYS AS IDENTITY or SERIAL, for some speed contest use cases collisions might be a thing)
  3. Change the primary key of Response from uuid to integer
    • Pros: conceptually simple, clean URLs
    • Cons: guessable, holes in numbering at responses to other surveys and rejected expense claims, does not start at 1
  4. Number rows in the response view (not realized into database)
    • Pros: dead simple to implement
    • Cons: numbering is dependant on filters, permanently deleting a response causes later numbers to shift
  5. Add an option in Survey that generates bank reference numbers for each Response
    • Pros: Might have usefulness in other use cases as well, where invoices are sent to people signed up via a survey
    • Cons: Still oddly specific

Slack discussion