Bug 28667

Summary: Check damaged item can be reserved in OPAC detail pages
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: OPACAssignee: Fridolin Somers <fridolin.somers>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: barbara.johnson, jonathan.druart
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:
Attachments: Bug 28667: Check damaged item can be reserved in OPAC detail pages
Bug 28667: Check damaged item can be reserved in OPAC detail pages
Bug 28667: Check damaged item can be reserved in OPAC detail pages
Bug 15156: Add filter_by_amount_owed that's chainable
Bug 28667: Check damaged item can be reserved in OPAC detail pages
Bug 28667: (QA follow-up) Fetch preference once

Description Fridolin Somers 2021-07-06 07:43:54 UTC
In OPAC detail pages, damaged items do not impact the "place hold" link.
This should depend on preference AllowHoldsOnDamagedItems.
Comment 1 Fridolin Somers 2021-07-06 07:51:11 UTC
Created attachment 122599 [details] [review]
Bug 28667: Check damaged item can be reserved in OPAC detail pages

In OPAC detail pages, damaged items must impact the "place hold" link.
This behavior depends on preference AllowHoldsOnDamagedItems.

Test plan :
1) Create a record with one damaged item
2) Set AllowHoldsOnDamagedItems to 'Allow'
3) Go to OPAC record detail page : opac-detail.pl
4) Check you see "Place hold" link
5) Set AllowHoldsOnDamagedItems to 'Don't allow'
6) Refresh page
7) Check you don't see "Place hold" link
Same tests 2 to 7 for pages opac-ISBDdetail.pl and opac-MARCdetail.pl
Comment 2 Owen Leonard 2021-07-13 11:54:32 UTC
I get an error:

Could not compile /kohadevbox/koha/opac/opac-detail.pl: Global symbol "$i" requires explicit package name (did you forget to declare "my $i"?) at /kohadevbox/koha/opac/opac-detail.pl line 725.
Comment 3 Fridolin Somers 2021-08-11 09:24:53 UTC
Oups indeed
Comment 4 Fridolin Somers 2021-08-11 09:25:30 UTC
Created attachment 123773 [details] [review]
Bug 28667: Check damaged item can be reserved in OPAC detail pages

In OPAC detail pages, damaged items must impact the "place hold" link.
This behavior depends on preference AllowHoldsOnDamagedItems.

Test plan :
1) Create a record with one damaged item
2) Set AllowHoldsOnDamagedItems to 'Allow'
3) Go to OPAC record detail page : opac-detail.pl
4) Check you see "Place hold" link
5) Set AllowHoldsOnDamagedItems to 'Don't allow'
6) Refresh page
7) Check you don't see "Place hold" link
Same tests 2 to 7 for pages opac-ISBDdetail.pl and opac-MARCdetail.pl
Comment 5 Biblibre Sandboxes 2021-08-11 22:19:12 UTC
Created attachment 123805 [details] [review]
Bug 28667: Check damaged item can be reserved in OPAC detail pages

In OPAC detail pages, damaged items must impact the "place hold" link.
This behavior depends on preference AllowHoldsOnDamagedItems.

Test plan :
1) Create a record with one damaged item
2) Set AllowHoldsOnDamagedItems to 'Allow'
3) Go to OPAC record detail page : opac-detail.pl
4) Check you see "Place hold" link
5) Set AllowHoldsOnDamagedItems to 'Don't allow'
6) Refresh page
7) Check you don't see "Place hold" link
Same tests 2 to 7 for pages opac-ISBDdetail.pl and opac-MARCdetail.pl

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 6 Nick Clemens 2021-09-17 12:05:58 UTC
Created attachment 124981 [details] [review]
Bug 15156: Add filter_by_amount_owed that's chainable

This patch acts as an alternative here. We pull out the code from bug
11983 and extend it to support filtering of debts by branchcode and
debit_type.

The advantage of this approach is that we can add the filter into the
middle of a search chain to filter down an pre-existing search.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Nick Clemens 2021-09-17 12:15:04 UTC
Created attachment 124982 [details] [review]
Bug 28667: Check damaged item can be reserved in OPAC detail pages

In OPAC detail pages, damaged items must impact the "place hold" link.
This behavior depends on preference AllowHoldsOnDamagedItems.

Test plan :
1) Create a record with one damaged item
2) Set AllowHoldsOnDamagedItems to 'Allow'
3) Go to OPAC record detail page : opac-detail.pl
4) Check you see "Place hold" link
5) Set AllowHoldsOnDamagedItems to 'Don't allow'
6) Refresh page
7) Check you don't see "Place hold" link
Same tests 2 to 7 for pages opac-ISBDdetail.pl and opac-MARCdetail.pl

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 8 Nick Clemens 2021-09-17 12:15:07 UTC
Created attachment 124983 [details] [review]
Bug 28667: (QA follow-up) Fetch preference once

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Jonathan Druart 2021-09-20 10:35:19 UTC
This is done on bug 3142, with duplicated code moved to a module, with tests.

*** This bug has been marked as a duplicate of bug 3142 ***