TabbycatDebate / tabbycat

Debating tournament tabulation software for British Parliamentary and a variety of two-team parliamentary formats
https://tabbycat.readthedocs.io/
GNU Affero General Public License v3.0
245 stars 828 forks source link

Ballot submission from adjudicators not keeping names #1451

Open 0zlw opened 4 years ago

0zlw commented 4 years ago

We've run into an issue where ballot submissions being submitted directly from adjudicators are reverting to "Speaker 1/Speaker 2/Speaker 3" when we go to confirm them.

This issue happens where, when adding teams, rather than replacing Speaker 1/Speaker 2/Speaker 3 with speaker names, we add the speaker names instead. We do this as because we are running a schools tournament, we want to keep the Speaker 1/Speaker 2/Speaker 3 options available in the event that schools sub in speakers they have not already registered.

This issue is happening for all submitted marksheets for two of our tournaments running v2.3.2

For example this is a screenshot of what Tabbycat shows:

image

And this is the written marksheet we received from the adjudicator:

12 - Affirming Junior Olive (235) lost to negating Junior Green (241).

Aff:

  1. Amira Stephenson, 68
  2. Max Bulley-Brown, 67
  3. Alisa Rao, 67 R. Amira Stephenson, 33 Neg:
  4. Ryan Antia, 71
  5. Alyna Mithani, 68
  6. Zahlia Prasad, 69 R. Alyna Mithani, 33

This is what one of the team's speaker names looks like.

image

tienne-B commented 4 years ago

Are the correct speakers shown in the database view (under Results -> Speaker Scores)?

0zlw commented 4 years ago

Yes! We have confirmed the other marksheet, but this is a marksheet from a debate with the same problem.

image

image

philipbelesky commented 4 years ago

Hey, thanks for this report. If you’re ok with us looking at your data, DM our Facebook page and I’ll let you know an email address to add as a collaborator on Heroku. I suspect something is making the JavaScript that replaces the names unhappy.

tienne-B commented 4 years ago

Okay. This narrows down the problem. The problem seems to be in filling the ballot from the draft result, not from saving the result (although saving it without correcting the faulty initial will override the correct info).

Can't immediately reproduce the problem, but the search is narrow and I'm looking :)

0zlw commented 4 years ago

Have sent a message, otherwise, you can email us directly at online@debating.org.nz.

0zlw commented 4 years ago

Just updating this with some additional information from some stuff I have setup for R1 of a new tournament running v2.3.2

I confirmed this marksheet with the correct speaker names as per the below screenshots.

image

image

When I reopen that marksheet despite being confirmed with the correct speaker names, it shows the following.

image

We kept the original Tabbycat Speaker 1/Speaker 2/Speaker 3. My read of the issue is that, if you don't change the speaker names, i.e. they are Speaker 1/Speaker 2/Speaker 3 as per the screenshot below, Tabbycat will by default populate them with Speaker 1/Speaker 2/Speaker 3.

image

In this case because we have kept the default speakers, but also added some Tabbycat overwrites the entered speaker names with the defaults which is causing the issue.

This is what happened when I deleted Speaker 1/Speaker 2/Speaker 3 from the database area.

image

This is then what happened when I manually added Speaker 1/Speaker 2/Speaker 3 back.

image

For comparison sake:

image

image

tienne-B commented 4 years ago

Very strange problem, as Tabbycat doesn't put defaults for speakers, and the default "Speaker #" speakers are no different to named speakers. If it's not @philipbelesky's theory, then we get to farfetched ideas like problems with the admin interface or caching. Philip, did you find anything?

philipbelesky commented 4 years ago

I haven't been able to reproduce this myself, although the notes above pretty much confirm what I was thinking: that its a problem with the javascript on that form page. Or to be precise, this block in enter_results.js.

I think this works out so that if you use generic speaker names (exactly "Speaker 1") then it essentially automatically selects the values in order. This may be a holdover from something like the WADL league options where you only care about team wins, not speakers, and so it saves time in prepopulating the form.

What this means is that if you use, say, "Speaker #1", as your placeholder value it should no longer do this. Could you confirm that @0zlw? I also wouldn't be averse to removing this functionality, or perhaps making it only apply on a less commonly used placeholder value.