Tigerbotics7125 / ScoutingLibSuite

A collection of tools which can be used for scouting teams for FRC
4 stars 0 forks source link

Fix non-regional/district/dcmp competition weeks and sorting #3

Open democat3457 opened 2 years ago

democat3457 commented 2 years ago

Current Behavior Non-regional/district/dcmp competitions, or just "special events," are given a value of Week 1 and sorted at the beginning of the team event list, even when the competition may not have occurred during Week 1.

Cause Special events get the week deserialized into the int default value of 0 when the week key actually returns null. Also, the code doesn't check for event_type or event_type_string, which will also allow checks on the type of the event to determine whether week value should be ignored.

DAflamingFOX commented 2 years ago

Just as clarification:

Probable Fix:

While I'm tempted to update the schema POJOs, it would break lots of code not checking for null values as currently the schema uses primitive data types. could be good for a later date though.