Bug 35306: Fix Expired holds when modding request

To test:
1. Make some holds on a record and make sure some are set to expired.
2. Go to to reserve/request.pl?biblionumber=X for the biblionumber
3. Try updating something besides the expiration date. i.e. Pickup library
4. Click Update hold(s)
5. Notice the expirated holds have lost their expiration date.
6. APPLY PATCH
7. Try steps 2-4 again, this time the expiration date shold be retained.
8. Make sure Table settings still work and you can properly hide columns.
9. The hold expiration date should be hide-able.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2023-11-10 14:54:00 +00:00 committed by Tomas Cohen Arazi
parent 0583deac95
commit c2a6356d58
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 8 additions and 1 deletions

View File

@ -1696,6 +1696,8 @@ modules:
columnname: date
-
columnname: expiration
cannot_be_toggled: 1
cannot_be_modified: 1
-
columnname: pickup_library
cannot_be_toggled: 1

View File

@ -127,7 +127,12 @@
[% END %]
</td>
<td>
<input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | html %]" size="10" name="expirationdate" />
[% UNLESS hold.expired %]
<input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | html %]" size="10" name="expirationdate" />
[% ELSE %]
<span class="expiredon"><label>Expired:</label> [% hold.expirationdate | $KohaDates %]</span>
<input type="hidden" value="[% hold.expirationdate | html %]" name="expirationdate" />
[% END %]
</td>
<td>
[%- IF ( hold.found ) -%]