Bug 23064: Use Koha::Subscription in ModSubscription
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 20 Nov 2019 11:22:58 +0000 (12:22 +0100)
committerJoy Nelson <joy@bywatersolutions.com>
Thu, 6 Feb 2020 23:01:13 +0000 (23:01 +0000)
commitd79888822bba76c1eab3530f5b792bd7c88bbbde
treece427cfe0092f31f6d82d3e94a348beffeb152d8
parent37c07b1b56a8a72d9473249bfa1cb512e08f7df9
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@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
C4/Serials.pm