Koha-clms/installer/data/mysql
Tomas Cohen Arazi 8a59b80e7e 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@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8df3e02885)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2021-03-04 11:49:40 +01:00
..
atomicupdate Bug 27808: DBRev 20.12.00.018 2021-03-04 11:49:38 +01:00
en Bug 23675: Add leader and default value for ACQ 2021-02-25 10:37:25 +01:00
fr-CA Bug 24811: French SQL files "news" link fixed 2021-01-29 14:29:05 +01:00
fr-FR Bug 24811: French SQL files "news" link fixed 2021-01-29 14:29:05 +01:00
it-IT Bug 27103: Remove HOLD_CANCELLATION notice 2020-11-27 13:00:38 +01:00
localization Bug 20168: Remove li tags from OPACSearchForTitleIn for new installs 2020-09-09 14:33:45 +02:00
mandatory Bug 25552: Add missing Claims Returned option to MarkLostItemsAsReturned 2021-02-05 17:17:07 +01:00
nb-NO Bug 27103: Remove HOLD_CANCELLATION notice 2020-11-27 13:00:38 +01:00
pl-PL Bug 27103: Remove HOLD_CANCELLATION notice 2020-11-27 13:00:38 +01:00
ru-RU Bug 11996: (follow-up) Updating the uk-UA currency 2021-01-29 14:20:31 +01:00
uk-UA Bug 11996: (follow-up) Updating the uk-UA currency 2021-01-29 14:20:31 +01:00
backfill_statistics.pl Bug 13795: Remove occurences of unused columns in code 2019-04-18 10:05:51 +00:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
kohastructure.sql Bug 24083: (follow-up) Respond to QA feedback 2020-11-11 16:09:58 +01:00
labels_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
patroncards_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
update22to30.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
updatedatabase.pl Bug 27808: (QA follow-up) Make sure the update catches the items we want 2021-03-04 11:49:40 +01:00