queue icon indicating copy to clipboard operation
queue copied to clipboard

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

Open wadefagen opened this issue 7 years ago • 6 comments

  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

wadefagen avatar Mar 15 '18 20:03 wadefagen

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.

nwalters512 avatar Mar 15 '18 20:03 nwalters512

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

zwang180 avatar Apr 01 '18 05:04 zwang180

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?

nicholascw avatar Apr 19 '18 22:04 nicholascw

You're welcome to submit a PR for that!

nwalters512 avatar Apr 19 '18 22:04 nwalters512

@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.

nicholascw avatar Apr 19 '18 22:04 nicholascw

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!

nwalters512 avatar Apr 19 '18 22:04 nwalters512