Make schoolIds case insensitive

Description

See also:

Except for student search by school_id, all person and external_person lookups by username (now fixed) or school_id appear to be case-sensitive in Postgres deployments. This is almost certainly not what a deployer typically wants by default and has already caused a problem with the North Carolina schools. At a minimum, lookups need to compare these fields case-insensitively, but we really should also force these fields to consistent casing in the db in order to properly take advantage of uniqueness constraints. Postgres might let us set up function-based indexes/constraints, though.

This ticket covers:
1. the scope of except for school_id
2. ExternalPersonSync (see comments below) -
3. externalPersonService.updatePersonFromExternalPerson still does a equal comparison not an equalsIgnoreCase. Change and test to verify sync works correctly.

Environment

None
100% Done
Loading...

relates to

Activity

Show:

Michael Sultzaberger 
June 27, 2017 at 9:27 PM

We will need to think about #3 above. If updatePersonFromExternalPerson is changed to use equalsIgnoreCase it then school id will not be updated in Person when the case changes. For example, if the school id in person is george and in external person it is GEORGE, then the person table will not get update to GEORGE. We will need to decide on what is the appropriate behavior in this instance.

Michael Sultzaberger 
June 26, 2017 at 6:28 PM

More details...

One of the school's person sync process is failing due to this issue. The school has some of their internal school ids in lower case while the majority are in upper case. All of their external school ids are in upper case. When person sync runs, the process fails when it gets to the school id with lower case.

Paul Spaude 
October 17, 2014 at 6:45 PM

From the field...

Recently two schools had issues with the

task failing due to school_id issues. This resulted in ticket: for notifications or a way to find out if tasks fail. However the root cause at least for one school is case insensitivity between person.school_id and external.person_school_id causing the failure.

Daniel McCallum 
October 17, 2014 at 6:43 PM

Has come up recently in field deployments so bumping up to 'Critical'. Don't see it making it into 2.6.0, though.

Details

Assignee

Reporter

Original estimate

Time tracking

No time logged4d remaining

Components

Fix versions

Priority

Created September 5, 2013 at 5:01 PM
Updated June 27, 2017 at 9:27 PM