barcradio/ultra-tracker

Duplicate Increment stops at X.2

Opened this issue · 2 comments

Not sure if this is intentional or not. But I thought duplicates would continue incrementing X.2, X.3, X.4 etc. However, when I put in the same bib multiple times, it keeps X.2 everytime.

If this is by design, go ahead and close this issue out.

Screenshot: https://cdn.zappy.app/0165457d6f2972cad7e4428dceaf70f9.png

When checking for duplicates, it takes the inputted number and checks if it exists in the database. If the number exists, it adds 0.2 to the number before creating the record. It doesn't validate that the x.2 number already exists.

Could a 'duplicates' value be added to each runner in the database? When a new duplicate is determined, multipy the duplicates value by 0.1 and add to the inputted number. The update the value of the duplicate field by 1. This might also simplify the math for counting total number of duplicates?