kumoricon / kumoreg

Attendee management and badge printing system
MIT License
1 stars 2 forks source link

Per-user badge prefix #36

Closed jashort closed 8 years ago

jashort commented 8 years ago

For creating badges, use a per-user configurable badge prefix instead of the user's initials.

jashort commented 8 years ago

The only gotcha I can think of with the way it's done now is that you could swap two user's badge prefixes and have them get out of sequence and break. For example:

User A: Prefix: UA Last badge number: 10 User B: Prefix: UB Last badge number: 20

Edit both users: User A: Prefix: UB Last badge number: 10 User B: Prefix: UA Last badge number: 20

When User a generates a badge, it will throw an error because the badge UB00011 already exists (it was created by User B before the swap.

Basically.... don't do that. I can't think of any time when it would be desirable to change a user's badge prefix after it's initially created, but I'm not blocking it.

Also, note that previously badges were always XY01234 (2 character prefix). There's not actually a limit being enforced now, though keeping it to 2-3 characters would be a good idea so it looks normal on badges. (Prereg badges are prefixed "ONL")