leading articles regexp is not case-insensitive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Just getting started in Evergreen and until I get git set up properly for a pull request, I thought it would be good to post this change here.
When you enable the "Map of search classes to regular expressions to warn user about leading articles." in Admin -> Server Administration -> Global Flags, it only works for lowercase articles. We're finding our users use capital letters often for Titles, so I'd like to suggest changing it to case-insensitive.
In Open-ILS/
'{"title": "^(a|the|an)\\s"}',
To make it case insensitive, it should be:
'{"title": "^(?i)(
The update script should be something like this:
UPDATE config.global_flag SET value = '{"title": "^(?i)(
This exist in Evergreen 2.5.0 up to master.
tags: | added: admin-pages |
Changed in evergreen: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Thanks! When you get your Git setup sorted and prepare a patch, I have a suggestion for the database update: have it change the global flag value only if its current value is the original seed data value. In other words, don't change if if the user has already set it to a different value:
UPDATE config.global_flag SET value = '{"title": "^(?i)( a|the|an) \\s"}' warnable_ regexp_ per_class'
WHERE name = 'opac.browse.
AND value <> '{"title": "^(a|the|an)\\s"}';