Bug 23485 - Holds to pull (pendingreserves.pl) should list barcodes
Summary: Holds to pull (pendingreserves.pl) should list barcodes
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Andrew Fuerste-Henry
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 23484
Blocks: 27538 27655
  Show dependency treegraph
 
Reported: 2019-08-21 13:44 UTC by Nick Clemens (kidclamp)
Modified: 2022-06-06 20:26 UTC (History)
7 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:
20.11.00, 20.05.05
Circulation function:


Attachments
Bug 23485: Add barocde to holds to pull (3.68 KB, patch)
2019-08-21 13:49 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 23485: Show barcode in holds to pull (1.89 KB, patch)
2020-09-16 11:23 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 23485: Show barcode in holds to pull (2.03 KB, patch)
2020-09-16 13:32 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 23485: Show barcode in holds to pull (3.54 KB, patch)
2020-09-16 13:44 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 23485: Show barcode in holds to pull (3.59 KB, patch)
2020-09-17 08:14 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 23485: Show barcode in holds to pull (3.43 KB, patch)
2020-09-18 13:40 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 23485: Show barcode in holds to pull (3.44 KB, patch)
2020-09-18 14:39 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 23485: Show barcode in holds to pull (3.44 KB, patch)
2020-09-18 19:31 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 23485: Show barcode in holds to pull (3.50 KB, patch)
2020-09-20 19:17 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2019-08-21 13:44:23 UTC
If you have an item level hold the 'Holds to pull' list needs to tell you which barcode in the case of several items being on the shelf
Comment 1 Nick Clemens (kidclamp) 2019-08-21 13:49:08 UTC
Created attachment 92404 [details] [review]
Bug 23485: Add barocde to holds to pull

This adds a barcode column, it tries to show 'Only' in the case of a single item, however, group by
problems here may mean that you see several items that will fill a next available hold on this record instead
of the single item to fill a patrons hold (i.e. the patron shown may not match the item list)

As the group by is a bigger problem, I don't think we should block this one by that

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now lists all the barcodes on the item, but shows the borrower with a single hold
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower
Comment 2 Fridolin Somers 2019-10-04 11:59:05 UTC
Why is there this line ?

+[% IF ( reserveloo.itemnumber ) %]Only[% END %]
Comment 3 Fridolin Somers 2019-10-04 12:03:34 UTC
(In reply to Fridolin SOMERS from comment #2)
> Why is there this line ?
> 
> +[% IF ( reserveloo.itemnumber ) %]Only[% END %]

Oh its to say hold is not on record but on a specific item ?
Should this be also on all item-level information Libraries, Call numbers, ... ?
Comment 4 Owen Leonard 2019-10-15 14:00:05 UTC
I'm concerned that the list of barcodes will be unmanageable for records which have a large number of items. On the holds queue report we say "31000000234552 or any available." Would that work here?

Also: If it is an item-level hold I think the barcode should not be displayed as a list item, so that "Only 32000000202225" displays together.
Comment 5 Katrin Fischer 2019-10-15 18:29:44 UTC
(In reply to Owen Leonard from comment #4)
> I'm concerned that the list of barcodes will be unmanageable for records
> which have a large number of items. On the holds queue report we say
> "31000000234552 or any available." Would that work here?
> 
> Also: If it is an item-level hold I think the barcode should not be
> displayed as a list item, so that "Only 32000000202225" displays together.

+1

Some libraries have a lot of copies for text books and similar. Agreeing with Owen.
Comment 6 Andrew Fuerste-Henry 2020-09-16 11:23:24 UTC
Created attachment 110172 [details] [review]
Bug 23485: Show barcode in holds to pull

Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold.

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now shows one possible valid barcode with the text "or any available."
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower
Comment 7 Owen Leonard 2020-09-16 13:11:58 UTC
Applying: Bug 23485: Show barcode in holds to pull
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt).
error: could not build fake ancestor
Patch failed at 0001 Bug 23485: Show barcode in holds to pull
Comment 8 Andrew Fuerste-Henry 2020-09-16 13:32:58 UTC
Created attachment 110195 [details] [review]
Bug 23485: Show barcode in holds to pull

Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold.

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now shows one possible valid barcode with the text "or any available."
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower
Comment 9 Andrew Fuerste-Henry 2020-09-16 13:37:29 UTC
I did something wrong here. Will have to sort it out :)
Comment 10 Andrew Fuerste-Henry 2020-09-16 13:44:22 UTC
Created attachment 110200 [details] [review]
Bug 23485: Show barcode in holds to pull

Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold.

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now shows one possible valid barcode with the text "or any available."
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower
Comment 11 Michal Denar 2020-09-17 08:14:23 UTC
Created attachment 110246 [details] [review]
Bug 23485: Show barcode in holds to pull

Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold.

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now shows one possible valid barcode with the text "or any available."
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 12 Martin Renvoize (ashimema) 2020-09-17 10:14:31 UTC
Comment on attachment 110246 [details] [review]
Bug 23485: Show barcode in holds to pull

Review of attachment 110246 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
@@ +105,5 @@
>          <td>
> +            [% IF ( reserveloo.barcode ) %]
> +            [% IF ( reserveloo.itemnumber ) %]Only[% END %]
> +                <ul>
> +                    [% FOREACH barcode IN reserveloo.barcode.first %]

Not sure this makes sense.. does reserveloo.barcord.first really return an array to loop on?

I would think you could simplify to just [% reserveloo.barcode.first %]

Also.. I'm not sure this needs to be nested in a list..

I think I'd expect simply

[% IF ( reserveloo.itemnumber ) %]Only [% reserveloo.barcode.first %][% ELSE %][% reserveloo.barcode.first %] or any available[% END %]

With the filters added in where appropriate of course ;)

Does that make sense, or am I misunderstanding the logic
Comment 13 Andrew Fuerste-Henry 2020-09-18 13:40:43 UTC
Created attachment 110391 [details] [review]
Bug 23485: Show barcode in holds to pull

Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold.
Also incorporating feedback to simplify the TT logic and remove list formatting.

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now shows one possible valid barcode with the text "or any available."
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 14 Andrew Fuerste-Henry 2020-09-18 13:42:23 UTC
 
> Does that make sense, or am I misunderstanding the logic

Nope, you're right on. Thanks, Martin! I was trying to nudge the existing patch just enough to make it work, but this is cleaner.
Comment 15 Owen Leonard 2020-09-18 14:14:37 UTC
A minor fix required:

FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
   FAIL	  filters
		missing_filter at line 107
Comment 16 Andrew Fuerste-Henry 2020-09-18 14:39:05 UTC
Created attachment 110400 [details] [review]
Bug 23485: Show barcode in holds to pull

Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold.
Also incorporating feedback to simplify the TT logic and remove list formatting.

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now shows one possible valid barcode with the text "or any available."
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 17 Michal Denar 2020-09-18 19:31:25 UTC
Created attachment 110411 [details] [review]
Bug 23485: Show barcode in holds to pull

Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold.
Also incorporating feedback to simplify the TT logic and remove list formatting.

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now shows one possible valid barcode with the text "or any available."
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 18 Katrin Fischer 2020-09-20 19:17:04 UTC
Created attachment 110436 [details] [review]
Bug 23485: Show barcode in holds to pull

Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold.
Also incorporating feedback to simplify the TT logic and remove list formatting.

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now shows one possible valid barcode with the text "or any available."
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Katrin Fischer 2020-09-20 19:18:45 UTC
I feel this patch is helpful as it is, but I could imagine more improvements in the future.

If I have a record with 3 holds on it, first is record level and 2 are item level, the report will tell me only about the next hold: Get any item. This is correct, but it might be even nicer if it told me to get barcode a, barcode b and any other other item. I think this would be not easy to implment, so we should have this patch here first.
Comment 20 Jonathan Druart 2020-09-28 14:11:24 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 21 Lucas Gass (lukeg) 2020-10-20 14:22:46 UTC
backported to 20.05.x for 20.05.05
Comment 22 Aleisha Amohia 2020-10-27 04:15:10 UTC
enhancement, not backported to 19.11.x