Summary: | Data in 245 field (subfield a or b) will be deleted if it has Quotation Marks | ||
---|---|---|---|
Product: | Koha | Reporter: | Kelly McElligott <kelly> |
Component: | Cataloging | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | critical | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, lucas, m.de.rooy, mtj, phil |
Version: | 18.05 | Keywords: | regression |
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21986 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: | Bug 22395: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation |
Description
Kelly McElligott
2019-02-22 14:10:40 UTC
Possible data loss bug - updating severity. Not just 245, though that's certainly the most likely field to have double-quotes in it: I tested 100/260/655, all of which are also affected, so there's no reason to think any tag isn't affected. 18.05.06, the value attribute for |"A" is for alibi| is |value=""A" is for alibi"|, 18.05.08 it's |value=""A"(etc.)| so practically speaking it's value="". Though conveniently, 500s aren't affected, since they are loaded as the content of a textarea element rather than as an attribute of an input element, so failing to escape them doesn't actually matter. Ah. Bug 21986 removed what had been escaping the quotes prior to 18.05.08, which doesn't cause this bug on 18.11.x or master because they both have the escaping from bug 13618, but that didn't land on 18.05 (or 17.11, which is probably also affected by this bug as of 17.11.14). CCing Lucas (Rmaint 18.05) and Fridolin (Rmaint 17.11) (In reply to Jonathan Druart from comment #5) > CCing Lucas (Rmaint 18.05) and Fridolin (Rmaint 17.11) Indeed I see the problem. I have reverted Bug 21986 from 17.11.x Created attachment 85769 [details] [review] Bug 22395: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation 18.06.00.060 will fail if custom Classification sources were created. In that case we should use the 'generic' split rule. Test plan: % git checkout -b bug_22395_pre 3a0cba67f1387595f570ab9d9efdeabc856345b4 Reset the DB Go to Home › Administration › Classification sources Create a custom "Classification filing rules" Create a custom "Classification sources" using this filing rules % git checkout master % perl installer/data/mysql/updatedatabase.pl => Without this patch you will get: DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`#sql-33a_67`, CONSTRAINT `class_source_ibfk_2` FOREIGN KEY (`class_split_rule`) REFERENCES `class_split _rules` (`class_split_rule`)) [for Statement " ALTER TABLE class_sources ADD CONSTRAINT class_source_ibfk_2 FOREIGN KEY (class_split_rule) REFERENCES class_split_rules (class_split_rule) "] at installer/data/mysql/updatedatabase.pl line 17104. => With this patch applied the FK will be created successfully class_sources.class_split_rule will be set to "generic" for these custom values. 21986 has been reverted from 18.05.x |