Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update / test remove MP letters task
There were a few edge cases which came up when I ran this task last night: 1) MySQL LIKE statements are case insensitive, so the query found things like "Francis Implementation Team" (as it's got a lower case mp in). 2) Even if it was case sensitive, %MP% would match people with MPhil degrees. 3) The `puts` statement being outside of the if statement caused some confusion - it would log things as updated that matched the query, but not the ruby gsub, even though they hadn't been updated. I considered making the MySQL query stricter, but then we might actually miss things (like someone with MP in their letters, but separated with a comma, or lower case). Instead, I've just made it clear which ones are being skipped in the logs. While writing tests for this, I also noticed an edge case where it would replace letters like "CBE MP VC" with "CBEVC" (i.e. it would remove both surrounding spaces from MP). Better to do it with split / join to avoid this I think.
- Loading branch information