Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#6291 closed (fixed)

CASocialInsuranceNumberField documentation error

Reported by: jeff+django@… Owned by: nobody
Component: contrib.localflavor Version: dev
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: no UI/UX: no

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 17 years ago.

Download all attachments as: .zip

Change History (9)

by arien, 17 years ago

Attachment: 6291.diff added

comment:1 by arien, 17 years ago

Has patch: set
Triage Stage: UnreviewedReady 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 by James Bennett, 17 years ago

Triage Stage: Ready for checkinUnreviewed

comment:3 by James Bennett, 17 years ago

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

comment:4 by arien, 17 years ago

Triage Stage: UnreviewedAccepted

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 by Chris Beaven, 17 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Adrian Holovaty, 17 years ago

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 by Adrian Holovaty, 17 years ago

Resolution: fixed
Status: newclosed

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

comment:8 by Chris Beaven, 17 years ago

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