https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32767
PTFS Europe Sandboxes <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156985|0 |1 is obsolete| | --- Comment #14 from PTFS Europe Sandboxes <[email protected]> --- Created attachment 159891 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159891&action=edit Bug 32767: New feature that trims attributes (if enabled) to avoid duplicates Added a new "Trim identifier:" checkbox for attribute editor page, that if enabled, will trim the value from any trailing whitespaces. The use case for this feature is to avoid unintentionally creating duplicate attribute values with trailing whitespaces around of it. If this checkbox is grayed for you, that means that you have some values surrounded with whitespaces, and Koha can't decide for you which you want to remove and when (because that as well will lead to creating duplicated entries). So in order to use this feature you first need to clean up your database from already existing values with trailing whitespaces. This SQL query might help you find all untrimmed attributes & borrowers: ```SELECT * FROM borrower_attributes WHERE code=%Attribute Name% AND attribute REGEXP "^\\s+|\\s+$";``` Steps to reproduce: 1. Go to the attribute editor page. Check if the "Trim identifier:" checkbox is not grayed. (if it is grayed, it means you have some values surrounded with whitespaces, in that case you need to fix them manually) 2. Check the checkbox and save settings. 3. Add that attribute for a preferred patron, enter some value with a trailing whitespaces around of it. 4. Check that the trailing whitespaces were trimmed correctly. Signed-off-by: Sam Lau <[email protected]> Signed-off-by: Anneli Österman <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
