Opened 14 years ago

Closed 14 years ago

#300 closed enhancement (fixed)

Allow non-standard personal numbers

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: Reggie v1.1
Component: net.sf.basedb.reggie Keywords:
Cc:

Description (last modified by Nicklas Nordborg)

The Personal number is usually a swedish personnummer. But there are exceptions when a person is not a swedish citizen. See http://owaspsweden.blogspot.com/2009/10/dds-programmera-med-personnummer-del-2.html

Reggie should display a warning instead of an error when an "invalid" personal number is encountered. The automatic forwarding to step 2 should not happen. The user must click on the "Next" button to verify that the personal number should be used as is.

Change History (5)

comment:1 by Nicklas Nordborg, 14 years ago

Description: modified (diff)

comment:2 by Nicklas Nordborg, 14 years ago

Status: newassigned

comment:3 by Nicklas Nordborg, 14 years ago

After some more investigations it seems like there are three main types of numbers:

  1. Personnummer
  2. Samordningsnummer
  3. Reservnummer, etc.

So, in the code, the validation procedure goes like this (pnr is short for personal number):

  • If the pnr starts with a 8-digit valid date (yyyyMMdd) and the control digit is ok, then it is a 'Personal number'. Automatic registration of date-of-birth and gender is possible.
  • If we get a valid date after subtracting 60 from the day-in-month digits, and the control digit is ok, then it is a 'Samordningsnummer'. Automatic registration of date-of-birth and gender is possible.
  • Otherwise it may be a 'Reservnummer'. The numbers/letters may not mean anything and automatic registration of date-of-birth and gender is NOT possible.

comment:4 by Nicklas Nordborg, 14 years ago

Summary: Allow invalid personal numbersAllow non-standard personal numbers

comment:5 by Nicklas Nordborg, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [1319]) Fixes #300: Allow non-standard personal numbers

This should now handle the 3 cases mentioned in comment 3.

Note: See TracTickets for help on using tickets.