Bug 31907 - Show items as On hold when in processing
Summary: Show items as On hold when in processing
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Stefan Berndtsson
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-21 12:20 UTC by Stefan Berndtsson
Modified: 2024-07-04 20:38 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:


Attachments
Bug 31907: Show items as On hold when in processing (4.51 KB, patch)
2022-10-21 12:21 UTC, Stefan Berndtsson
Details | Diff | Splinter Review
Bug 31876: Fix capitalization "Click to Expand Tag" (6.57 KB, patch)
2022-10-24 20:35 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31907: Show items as On hold when in processing (4.56 KB, patch)
2022-10-31 00:39 UTC, David Nind
Details | Diff | Splinter Review
Bug 31907: Show items as On hold when in processing (4.62 KB, patch)
2022-11-02 17:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 31907: (QA follow-up) Add POD (696 bytes, patch)
2022-11-02 17:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 31907: (QA follow-up) Simplify tests (2.89 KB, patch)
2022-11-04 23:19 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Berndtsson 2022-10-21 12:20:36 UTC
The addition of the Processing reserve status should show status in Opac as On hold, just like it does for Waiting.

This patch adds that to item list in opac-detail and opac-basket.
Comment 1 Stefan Berndtsson 2022-10-21 12:21:13 UTC
Created attachment 142339 [details] [review]
Bug 31907: Show items as On hold when in processing

Test plan:
1. Make sure syspref "opacbookbag" is set to "Allow".
2. Make sure syspref "HoldsNeedProcessingSIP" is set to "Don't fulfill".
3. Place a hold on an item.
4. Return item via SIP at the pickup library.
5. View biblio in Opac.
6. Note that it says "Available" as status.
7. Add biblio to Cart.
8. Open Cart.
9. Note that it says "Available" as status.
10. Apply patch.
11. Reload Opac page.
12. It should now say "On hold".
13. Reload Card page.
14. It should also say "On hold".
Comment 2 Katrin Fischer 2022-10-24 20:35:46 UTC Comment hidden (obsolete)
Comment 3 David Nind 2022-10-31 00:39:08 UTC
Created attachment 142821 [details] [review]
Bug 31907: Show items as On hold when in processing

Test plan:
1. Make sure syspref "opacbookbag" is set to "Allow".
2. Make sure syspref "HoldsNeedProcessingSIP" is set to "Don't fulfill".
3. Place a hold on an item.
4. Return item via SIP at the pickup library.
5. View biblio in Opac.
6. Note that it says "Available" as status.
7. Add biblio to Cart.
8. Open Cart.
9. Note that it says "Available" as status.
10. Apply patch.
11. Reload Opac page.
12. It should now say "On hold".
13. Reload Card page.
14. It should also say "On hold".

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2022-10-31 00:41:58 UTC
Testing notes using koha-testing-docker (KTD):

1. Check that SIP is running (should be if using KTD): koha-sip --status kohadev

2. I used item 39999000001310 (biblionumber = 29) from CPL to test, hold placed for pick up at CPL

3. For step 4, command using misc/sip_cli_emulator.pl to return item: misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkin --item 39999000001310

4. For step 10, after applying the patch I ran flush_memcached and restart_all

Note: I obsoleted comment #2, as it was a patch for another bug incorrectly added to this bug.
Comment 5 Martin Renvoize (ashimema) 2022-11-02 17:06:19 UTC
Created attachment 143018 [details] [review]
Bug 31907: Show items as On hold when in processing

Test plan:
1. Make sure syspref "opacbookbag" is set to "Allow".
2. Make sure syspref "HoldsNeedProcessingSIP" is set to "Don't fulfill".
3. Place a hold on an item.
4. Return item via SIP at the pickup library.
5. View biblio in Opac.
6. Note that it says "Available" as status.
7. Add biblio to Cart.
8. Open Cart.
9. Note that it says "Available" as status.
10. Apply patch.
11. Reload Opac page.
12. It should now say "On hold".
13. Reload Card page.
14. It should also say "On hold".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2022-11-02 17:06:23 UTC
Created attachment 143019 [details] [review]
Bug 31907: (QA follow-up) Add POD

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2022-11-02 17:07:15 UTC
All works as expected, Unit tests included and QA script happy once the follow-up was added.

Passing QA
Comment 8 Tomás Cohen Arazi (tcohen) 2022-11-04 23:19:26 UTC
Created attachment 143296 [details] [review]
Bug 31907: (QA follow-up) Simplify tests

This patch simplipfies the tests, and highlighs the fact the introduced
method should add filters to the current resultset.

It also aligns the tests with the currently adopted style.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Tomás Cohen Arazi (tcohen) 2022-11-04 23:21:37 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 10 Magnus Enger 2022-12-30 10:36:28 UTC
Any chance of a backport to 22.05 and 21.11? (I have not tested, but a library has reported that this is a problem in 21.11)