[Koha-bugs] [Bug 20592] updateitem.pl causes database errors when empty non-public item notes updated

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 17 04:52:29 CEST 2018


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

--- Comment #1 from David Cook <dcook at prosentient.com.au> ---
Created attachment 74286
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74286&action=edit
Bug 20592 - updateitem.pl causes database errors when empty non-public item
notes updated

Previously, clicking "Update" next to non-public item note when the text
box was empty would generate a database error.

This patches adds a condition where ModItem() is only called
if there are actual changes to be made to the record.

_TEST PLAN_
1) Create a bibliographic record
2) Create an item for that bib record
3) Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=1&itemnumber=1
4) Click "Update" next to "Non-public note"
5) Note a "DBD::mysql::st execute failed" error in your logs

6) Apply patch

7) Click "Update" next to "Non-public note"
8) Note that there is no longer an error
9) Add text to the box and click "Update" to ensure update still works

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


More information about the Koha-bugs mailing list