Bug 29719: Do not clear onloan value when not passed in MARC
authorNick Clemens <nick@bywatersolutions.com>
Fri, 14 Jan 2022 19:59:30 +0000 (19:59 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 16 May 2022 21:20:09 +0000 (11:20 -1000)
commit55cc21278798b6b5706050eaf377b5eb3f569bcb
tree3a89db200bd20e9b1ead6d165445135b79050a48
parentb79608edd3f8818c9de4e407703343b787f812d8
Bug 29719: Do not clear onloan value when not passed in MARC

We blank the field to prevent users from setting it during import, but this has the
affect of blanking it in the DB.
This patch replaces the onloan field when not passed in to 'ModItemFromMARC' to preserve
the value

To test:
 1 - Check an item out to a paron
 2 - Export the item using Tools->Export data
 3 - Stage the record for import
 4 - Match on 999c and replace items
 5 - Import the batch
 6 - View the record and note item is checked out and Available
 7 - In the DB note the onloan value is now null
 8 - Check in the item
 9 - Apply patch
10 - Repeat 1-5
11 - View the record and note item is checked out
12 - In the DB note the onloan value matches the due date

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Items.pm