Bug 21606

Summary: Issues with matching rules
Product: Koha Reporter: Nick Clemens <nick>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, m.de.rooy, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 17258    
Attachments: Bug 21606: [sql_modes] Fix matching rules insert
Bug 21606: [sql_modes] Fix matching rules insert

Description Nick Clemens 2018-10-18 13:59:52 UTC
There are silent failures not apparent to sued when saving matchpints:
DBD::mysql::st execute failed: Incorrect integer value: '' for column 'offset' at row 1 [for Statement "INSERT INTO matchpoint_components 
                                     (matchpoint_id, sequence, tag, subfields, offset, length)
                                     VALUES (?, ?, ?, ?, ?, ?)" with ParamValues: 0='42', 1=1, 2="", 3='', 4="", 5=0] at /home/vagrant/kohaclone/C4/Matcher.pm line 348.


Additionally -silent failure if you enter letters into the match value sections, we should probably prevent that
Comment 1 Jonathan Druart 2018-10-18 22:28:46 UTC
Created attachment 80886 [details] [review]
Bug 21606: [sql_modes] Fix matching rules insert

Fix:
Incorrect integer value: '' for column 'offset'
Incorrect integer value: '' for column 'score'

Test plan:
Add/edit matching rules
Comment 2 Marcel de Rooy 2018-11-02 06:56:34 UTC
Created attachment 81860 [details] [review]
Bug 21606: [sql_modes] Fix matching rules insert

Fix:
Incorrect integer value: '' for column 'offset'
Incorrect integer value: '' for column 'score'

Test plan:
Add/edit matching rules

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2018-11-02 07:01:02 UTC
Trivial fix, combined SO + QA
Comment 4 Nick Clemens 2018-11-02 10:43:21 UTC
Awesome work all!

Pushed to master for 18.11
Comment 5 Martin Renvoize 2018-11-16 12:07:58 UTC
Pushed to 18.05.x for 18.05.06
Comment 6 Fridolin Somers 2018-11-28 14:08:54 UTC
SQL modes not in 17.11.x