fw42 / cubecomp

WCA Rubik's Cube competition website hosting
https://cubecomp.de/
MIT License
10 stars 4 forks source link

Broken CSV export #219

Closed SAuroux closed 8 years ago

SAuroux commented 8 years ago

Unfortunately, it looks like #218 broke some stuff. I was just contacted by Oleg Gritsenko who wanted to get the CSV export for a competition he delegates this weekend. He reported the following:

I was able to help him out by noticing the following two bugs:

  1. The CSV export does not recognize registrations for official events if the chosen eventId within the schedule does not match the CSV export eventId, e.g. "2" in the schedule used for 2x2x2 results in a column full of zeros since the CSV export works with "222".
  2. Events which are set to "Waiting list" are missing from the CSV export. This was the problem for 3x3x3 for the competition above. Certainly, this is no senseful behaviour by the CSV export generation script.
fw42 commented 8 years ago
  1. is expected. How would I know that his event is supposed to be the official 3x3 event if he doesn't use the official event code? If the event was created using the "Load event" button, then the code should be correct though. Or am I misunderstanding the issue?
  2. is not really a bug but the intended behaviour. If you think the export should always include waiting competitors, then I can change it though.
SAuroux commented 8 years ago
  1. True, but that raises an interesting question: why is the CSV export still displaying the correct events (the correct 7 official events, but with WCA eventId and zeros)? So there must be a macthing in some way.
  2. You are probably misunderstanding me: The event was set to "Waiting list", not the competitors. All registrations for the event were active.
fw42 commented 8 years ago
  1. ooh, I see. ok that does sound like a bug. Will investigate.
fw42 commented 8 years ago

argh I meant 2 :-)

Claster commented 8 years ago

Thank you for diging into this.

I'm not sure whether you have expected it or not, but after changing handles from "2" to "222" columns in "competitors" tab changed as well. So now columns like "333bf" and "333oh" are much thicker than when they were "3b" and "oh". Not that I care much about such design issue, just wanted to notice this side effect. Or maybe am I doing it wrong, and there is a possibility to specify "333bf" for CSV exports and "3b" for column name? https://cubecomp.de/ww16/de/competitors

fw42 commented 8 years ago

I just deployed a new version that should address both issues. Can you please check and confirm?

fw42 commented 8 years ago

Please change your handles back to what they were before, i.e. 3 and not 333. The CSV export should understand this format now, like it was originally intended. I just messed something up a few days ago (https://github.com/fw42/cubecomp/commit/90c93364).

Sorry about this!

Claster commented 8 years ago

Yes, it works now, short names are shown in competitors tab, and expanded names are in CSV export. Thanks!