Bug 21606 - Issues with matching rules
Summary: Issues with matching rules
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 17258
  Show dependency treegraph
 
Reported: 2018-10-18 13:59 UTC by Nick Clemens
Modified: 2018-11-28 14:08 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21606: [sql_modes] Fix matching rules insert (1.54 KB, patch)
2018-10-18 22:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21606: [sql_modes] Fix matching rules insert (1.63 KB, patch)
2018-11-02 06:56 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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