Bug 38100

Summary: Items with damaged status are shown in OPAC results as "Not available" even with AllowHoldsOnDamagedItems
Product: Koha Reporter: Janusz Kaczmarek <januszop>
Component: OPACAssignee: Janusz Kaczmarek <januszop>
Status: RESOLVED FIXED QA Contact: Paul Derscheid <paul.derscheid>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jesse, lucas, paul.derscheid, pmis
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06,23.11.11
Circulation function:
Attachments: Bug 38100: Items with damaged status are shown in OPAC results as "Not available" even with AllowHoldsOnDamagedItems
Bug 38100: Unit tests
Bug 38100: Items with damaged status are shown in OPAC results as "Not available" even with AllowHoldsOnDamagedItems
Bug 38100: Unit tests
Bug 38100: Items with damaged status are shown in OPAC results as "Not available" even with AllowHoldsOnDamagedItems
Bug 38100: Unit tests
Bug 38100: (QA follow-up) Tidy changes in C4/XSLT.pm

Description Janusz Kaczmarek 2024-10-04 19:03:37 UTC
Items with damaged status are shown on the OPAC results page as "Not available" even with AllowHoldsOnDamagedItems set to 'Allow', which is misleading for the users.  'other/Damaged' status should be assigned only if AllowHoldsOnDamagedItems is set to 'Don't allow'.
Comment 1 Janusz Kaczmarek 2024-10-04 19:40:58 UTC
Created attachment 172426 [details] [review]
Bug 38100: Items with damaged status are shown in OPAC results as "Not available" even with AllowHoldsOnDamagedItems

Items with damaged status are shown on the OPAC results page as "Not
available" even with AllowHoldsOnDamagedItems set to 'Allow', which is
misleading for the users.  'other/Damaged' status should be assigned
only if AllowHoldsOnDamagedItems is set to 'Don't allow'.

Test plan:
==========

1. Check that AllowHoldsOnDamagedItems system preference is set to
   'Allow'.
2. In librarian interface, change the damaged status of an item by
   setting it to 'Damaged'.
3. In OPAC, make a search for the record with this item attached.  Use
   common words from title to get a list and not a single record.
4. Note that the item in question is labelled as 'Not available'
   (Damaged).
5. Apply the patch; restart_all.
6. Repeat p. 3.  Note that the item is now labelled as 'available for
   loan'.
7. Set AllowHoldsOnDamagedItems system preference is set to 'Don't
   allow'.
8. Repeat p. 3.  Note that the item is now labelled as 'Not available'.
Comment 2 Janusz Kaczmarek 2024-10-04 19:41:00 UTC
Created attachment 172427 [details] [review]
Bug 38100: Unit tests
Comment 3 Roman Dolny 2024-10-05 10:56:49 UTC
Created attachment 172429 [details] [review]
Bug 38100: Items with damaged status are shown in OPAC results as "Not available" even with AllowHoldsOnDamagedItems

Items with damaged status are shown on the OPAC results page as "Not
available" even with AllowHoldsOnDamagedItems set to 'Allow', which is
misleading for the users.  'other/Damaged' status should be assigned
only if AllowHoldsOnDamagedItems is set to 'Don't allow'.

Test plan:
==========

1. Check that AllowHoldsOnDamagedItems system preference is set to
   'Allow'.
2. In librarian interface, change the damaged status of an item by
   setting it to 'Damaged'.
3. In OPAC, make a search for the record with this item attached.  Use
   common words from title to get a list and not a single record.
4. Note that the item in question is labelled as 'Not available'
   (Damaged).
5. Apply the patch; restart_all.
6. Repeat p. 3.  Note that the item is now labelled as 'available for
   loan'.
7. Set AllowHoldsOnDamagedItems system preference is set to 'Don't
   allow'.
8. Repeat p. 3.  Note that the item is now labelled as 'Not available'.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 4 Roman Dolny 2024-10-05 10:56:52 UTC
Created attachment 172430 [details] [review]
Bug 38100: Unit tests

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 5 Paul Derscheid 2024-11-07 11:13:36 UTC
Created attachment 174112 [details] [review]
Bug 38100: Items with damaged status are shown in OPAC results as "Not available" even with AllowHoldsOnDamagedItems

Items with damaged status are shown on the OPAC results page as "Not
available" even with AllowHoldsOnDamagedItems set to 'Allow', which is
misleading for the users.  'other/Damaged' status should be assigned
only if AllowHoldsOnDamagedItems is set to 'Don't allow'.

Test plan:
==========

1. Check that AllowHoldsOnDamagedItems system preference is set to
   'Allow'.
2. In librarian interface, change the damaged status of an item by
   setting it to 'Damaged'.
3. In OPAC, make a search for the record with this item attached.  Use
   common words from title to get a list and not a single record.
4. Note that the item in question is labelled as 'Not available'
   (Damaged).
5. Apply the patch; restart_all.
6. Repeat p. 3.  Note that the item is now labelled as 'available for
   loan'.
7. Set AllowHoldsOnDamagedItems system preference is set to 'Don't
   allow'.
8. Repeat p. 3.  Note that the item is now labelled as 'Not available'.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 6 Paul Derscheid 2024-11-07 11:13:39 UTC
Created attachment 174113 [details] [review]
Bug 38100: Unit tests

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 7 Paul Derscheid 2024-11-07 11:13:41 UTC
Created attachment 174114 [details] [review]
Bug 38100: (QA follow-up) Tidy changes in C4/XSLT.pm
Comment 8 Katrin Fischer 2024-11-08 10:15:17 UTC
I think if "Damaged" means available or not available is highly depending on the workflows of the library and how the status is used internally. But this makes it a bit more flexible, which is good.
Comment 9 Katrin Fischer 2024-11-08 10:24:58 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 10 Lucas Gass (lukeg) 2024-12-05 22:10:10 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 11 Fridolin Somers 2024-12-18 13:06:11 UTC
Pushed to 23.11.x for 23.11.11
Comment 12 Jesse Maseto 2025-02-03 16:26:21 UTC
Not pushed to LTS. Marked Resolved.

If you feel this should be in LTS please reply with your reason.