Bug 35489: [23.05.x] Add a hidden input for itemnumber even if item has no barcode

This page is a single form, all fields must have inputs to avoid data loss/mismatch

To test:
1 - Find a record in the catalog and add or edit items to have one item with a barcode and one without
2 - Place an item level hold on the item with no barcode
3 - Place another hold for a different patron on the item with a barcode
4 - From the holds table add an expiration date to the hold with a barcode and save
5 - Note the hold on the item with no barcode is now on the item with a barcode and the other hold is now a next available hold
6 - Delete the holds
7 - Apply patch
8 - Repeat 2-4
9 - Confirm the itemnumbers for the holds have not changed

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
Nick Clemens 2023-12-05 15:47:23 +00:00 committed by wainuiwitikapark
parent 9728b4f78c
commit 2ccf5b8cf5
1 changed files with 2 additions and 2 deletions

View File

@ -165,10 +165,10 @@
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&amp;itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
[%- IF ( hold.barcodenumber ) -%]
[%- hold.barcodenumber | html -%]
<input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
[%- ELSE -%]
<span>No barcode</span>
[%- END -%]
<input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
</a>
[%- ELSE -%]
[%- IF ( hold.item_level_hold ) -%]
@ -177,10 +177,10 @@
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&amp;itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
[%- IF ( hold.barcodenumber ) -%]
[%- hold.barcodenumber | html -%]
<input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
[%- ELSE -%]
<span>No barcode</span>
[%- END -%]
<input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
</a>
</em>
[%- ELSE -%]