[Koha-bugs] [Bug 23064] Cannot edit subscription with strict SQL modes turned on

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 22 23:03:06 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23064

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #97753|0                           |1
        is obsolete|                            |

--- Comment #11 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 97754
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97754&action=edit
Bug 23064: Use Koha::Subscription in ModSubscription

We must use Koha::Subscription instead of raw SQL.
It will fix issue with default and integer values.

Test plan:
Edit a subscription and set number of issues = "f"
Save
=> Without this patch there is a SQL error in the log:
  Incorrect integer value: 'f' for column 'numberlength'
=> With this patch the other changes are effective.

Note: We also could change the type attribute of the input to "number",
to have a client-side check

Also, the return value of ModSuggestion is never used, so we are safe
with that.

Signed-off-by: Hayley Mapley <hayleymapley at catalyst.net.nz>
The <strict_sql_modes> flag must be present and set to 1 in the <config>
section of koha-conf.xml

Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list