jpschewe / fll-sw

FIRST Lego League scoring software
http://jpschewe.github.io/fll-sw/
GNU General Public License v2.0
10 stars 7 forks source link

Awards winner lookup bug #1158

Closed jpschewe closed 7 months ago

jpschewe commented 7 months ago

Based on how the software behaved today at the State tournament it appears that the lookup for Champions (and likely other similar awards) isn't including the tournament when checking the database.

jpschewe commented 7 months ago

It's not the tournament lookup. It's a problem with where I'm looking for the Champion's data and where I'm writing it to. In some places I'm looking in the non-numeric category table and some places it appears I'm looking in the subjective category table. This needs to be mapped out and documented. Start with the finalist scheduling code and see where that works with and then check the award winner code.

jpschewe commented 7 months ago

In finalist.js the Championship category is loaded when the challenge description subjective categories is loaded. It is listed as numeric and not overall and is scheduled, just like the other subjective categories.

edit-award-winners.jsp looks in extraAwardWinners for the Championship category winners. This is also used for the perAwardGroup categories on this page. extraAwardWinners is populated from AwardWinners.getNonNumericAwardWinners AddAwardWinner stores the Championship category data with AwardWinners.updateNonNumericAwardWinner.

The problem comes with deliberation.js as it checks the javascript object and if it's numeric property is set to true, then it uses SubjectiveAwardWinners as the URL, putting the Championship teams in a table other than where the editing of award winners is checking.

jpschewe commented 7 months ago

Looking at the database from the 2022/2023 season I see the championship category data all stored in subjective_extra_award. This is tied to the *NonNumericAwardWinner methods in AwardWinners.