[Koha-bugs] [Bug 27808] Item's onloan column remains unset if a checked out item is issued to another patron without being returned first
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Mar 1 15:57:16 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27808
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #117454|0 |1
is obsolete| |
--- Comment #22 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 117456
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117456&action=edit
Bug 27808: (QA follow-up) Make sure the update catches the items we want
This query:
SELECT *
FROM items
LEFT JOIN issues
ON issues.itemnumber=items.itemnumber
WHERE items.onloan IS NULL;
returns 961 rows on the sample data, with 2 items checked out and onloan
set to NULL.
With this tweak, the query only matches the 2 checkout items with onloan
set to NULL:
SELECT *
FROM items
LEFT JOIN issues
ON issues.itemnumber=items.itemnumber
WHERE items.onloan IS NULL AND issues.issue_id IS NOT NULL;
This is the query that needs to be used on the atomic update for
filtering the items to be updated.
This patch does that.
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list