Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6291 closed (fixed)

CASocialInsuranceNumberField documentation error

Reported by: jeff+django@… Owned by: nobody
Component: contrib.localflavor Version: master
Severity: Keywords: localflavor, ca
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Minor documentation error on CASocialInsuranceNumberField:

"A form field that validates input as a Canadian Social Insurance Number (SIN). A valid number must have the format XXX-XXX-XXXX and pass a Luhn mod-10 checksum."

Canadian SIN is a 9 digit number, not a 10 digit as suggested in the documentation.

Also noted that the default_error_messages text has the same mistake.

Attachments (1)

6291.diff (1.4 KB) - added by arien 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by arien

comment:1 Changed 8 years ago by arien

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

(http://www.hrsdc.gc.ca/en/gateways/nav/top_nav/program/sin.shtml confirms the SIN is 9 digits in length.)

The attached patch fixes the docs, a comment in the code and the default error message; the regex used to validate a SIN is correct as it is.

comment:2 Changed 8 years ago by ubernostrum

  • Triage Stage changed from Ready for checkin to Unreviewed

comment:3 Changed 8 years ago by ubernostrum

(don't mark your own tickets "ready for checkin"; that's the job of a triager or committer)

comment:4 Changed 8 years ago by arien

  • Triage Stage changed from Unreviewed to Accepted

It's not "my" ticket. (I didn't report it.) I did submit the patch when triaging, though.

The reason I promoted straight to "ready for checkin" instead of leaving it as "accepted" (as I normally would have done) is that the issue is factual and easily verifiable (hence the link to a Canadian government site confirming the issue), and moreover the patch is trivial. I thought that would be okay in this case.

I'll move to "accepted" and leave it to somebody else to mark as "ready for checkin" if they feel that is the case.

comment:5 Changed 8 years ago by SmileyChris

  • Triage Stage changed from Accepted to Ready for checkin

comment:6 Changed 8 years ago by adrian

Note that the patch is technically not ready for checkin, because it breaks the tests in tests/regressiontests/forms/localflavor/ca.py. I will fix this on my own, but in the future we should make sure the tests pass before marking something as "Ready for checkin."

comment:7 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [6985]) Fixed #6291 -- Fixed error in CASocialInsuranceNumberField documentation and error message. Thanks, jeff+django@… and arien

comment:8 Changed 8 years ago by SmileyChris

Apologies Adrian, I really should have checked that. I promise to be a bit less promote-happy :)

Note: See TracTickets for help on using tickets.
Back to Top