illinois / queue

A microservice queue for holding open office hours
University of Illinois/NCSA Open Source License
82 stars 36 forks source link

Adding a course staff NetID with a space prevents that member from ever existing without a space #64

Open wadefagen opened 6 years ago

wadefagen commented 6 years ago
  1. Add a NetID to course staff with additional whitespace at the end: "waf "
  2. Remove that NetID from the course staff
  3. Re-add the same NetID without whitespace ("waf")

Expected result: "waf" is added Actual result: "waf " is added

nwalters512 commented 6 years ago

All MySQL collations are of type PAD SPACE. This means that all CHAR, VARCHAR, and TEXT values are compared without regard to any trailing spaces.

Nice.

Fixing #63 should fix this. @wadefagen if this is causing a problem for people, go ahead and do a manual database query to trim all netids until I get fix this to trim net ids on add.

zwang180 commented 6 years ago

I'm assuming this should already been fixed along with #63?

nicholascw commented 6 years ago

Read through #63's fix, wondering if check the field with RegEx, and let user refine their filling in (like how most website dealing with email field) a better option rather than simply trimming?

nwalters512 commented 6 years ago

You're welcome to submit a PR for that!

nicholascw commented 6 years ago

@nwalters512 I would like to, if I writes Node.js! Probably this summer I would learn about it. Plus, Programming Exam C is coming catch me today xD, also other midterms this week, so probably I would try if this issue is still open this June.

nwalters512 commented 6 years ago

Yeah, development is slowing down as stuff ramps up for the end of the semester :) no rush, it would be great to see more contributors!