Bug 10638 - Show alert when receiving an order with holds/reserves
Summary: Show alert when receiving an order with holds/reserves
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: David Cook
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-24 03:44 UTC by David Cook
Modified: 2017-04-17 06:32 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10638 - Show alert when receiving an order with holds/reserves (6.49 KB, patch)
2013-07-24 05:59 UTC, David Cook
Details | Diff | Splinter Review
Bug 10638 - Show alert when receiving an order with holds/reserves (6.51 KB, patch)
2013-07-24 06:32 UTC, David Cook
Details | Diff | Splinter Review
Bug 10638 - Show alert when receiving an order with holds/reserves (6.50 KB, patch)
2013-07-29 05:14 UTC, David Cook
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10638 - Show alert when receiving an order with holds/reserves (6.54 KB, patch)
2013-07-30 03:54 UTC, Srdjan Jankovic
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2013-07-24 03:44:59 UTC
When orders are received, there should be a message saying whether there are any holds/reserves tied to that order's bib record or item records.

If AcqCreateItem is set to "receiving an order" or "placing an order", you might want to know if the item you're receiving can fill a bib-level hold (i.e. "the next available item").

If AcqCreateItem is set to "placing an order", you might want to know if the physical item you're receiving already has a item-level hold on it.
Comment 1 David Cook 2013-07-24 05:59:38 UTC Comment hidden (obsolete)
Comment 2 David Cook 2013-07-24 06:32:36 UTC Comment hidden (obsolete)
Comment 3 Srdjan Jankovic 2013-07-25 03:16:31 UTC
& is a reserved character in urls, and should not be replaced with &
Comment 4 David Cook 2013-07-26 06:38:35 UTC
(In reply to Srdjan Jankovic from comment #3)
> & is a reserved character in urls, and should not be replaced with &

Do you have a source for that Srdjan? It's not that I doubt you, but it's a subject that I've pondered and tried researching many times. If you look elsewhere in Koha, you'll notice query strings that use the & entity instead of &. 

In terms of XHTML validation, I've seen/heard of issues with validation when there are links that use & instead of &. Browsers seem to handle & just fine instead of &. 

Examples of & over &: 

admin/z3950servers.tt
opac-detail.tt
opac-results.tt
etc...

Even if that is the case though, I'm sure that could be added in a follow-up.
Comment 5 Srdjan Jankovic 2013-07-26 11:55:39 UTC
It's a hairy issue HTML an HTTP stepping on each other's toes, and browsers trying to be "helpful" does not help at all. Re links, google for "html escape ampersand" or similar.
However, in this case, I believe we are talking Redirect header, which is not HTML, so no escaping applies.
Comment 6 David Cook 2013-07-29 05:10:48 UTC
(In reply to Srdjan Jankovic from comment #5)
> It's a hairy issue HTML an HTTP stepping on each other's toes, and browsers
> trying to be "helpful" does not help at all. Re links, google for "html
> escape ampersand" or similar.
> However, in this case, I believe we are talking Redirect header, which is
> not HTML, so no escaping applies.

Ahhh, I understand now. Thanks for the clarification :). I'll send a new patch.
Comment 7 David Cook 2013-07-29 05:14:20 UTC Comment hidden (obsolete)
Comment 8 Srdjan Jankovic 2013-07-30 03:54:33 UTC
Created attachment 19983 [details] [review]
[SIGNED-OFF] Bug 10638 - Show alert when receiving an order with holds/reserves

This patch adds an alert message in Acquisitions when receiving new
orders.

If there are bib-level holds for the bib record attached to that order,
it gives a count of the bib-level holds.

If there are item-level holds for items attached to that order, it
shows a count of the items as well as displaying the barcodes for the
items that have holds/reserves on them.

If there are item-level holds for items not attached to that order and
there are no bib-level holds, the message will just say that there are
pending reserves for that bib record.

TEST PLAN

1) Set AcqCreateItem to "placing an order"
2) Place an order in Acquisitions
3) Create three or four items when placing that order
4) In the OPAC or staff client, place a hold on one item
5) Receive the order
6) Note that there is no alert message about the hold/reserve

7) Apply the patch

8) Receive another item for that order
9) Note that there should now be a yellow alert message at the top of
the parcel.pl screen.

10) The message text will vary depending on the reserve/hold situation.

If there are bib-level holds, it will display a count of bib-level holds.

If there are item-level holds for items attached to that order, it will
show a count of those holds and print out their barcodes. (N.B. if you
are receiving part of an order, your order number will change, so it
will only print information for the received items that are attached
to this new order, rather than all items including the original order.)

If there are item-level holds for items attached to a different order
or no order at all, no specific information will be printed. It will
just say that there are pending reserves for that record (or that
there are bib-level holds, if there are bib-level holds).

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Comment 9 Jonathan Druart 2013-09-13 10:24:08 UTC
(In reply to David Cook from comment #7)
> If there are item-level holds for items not attached to that order and
> there are no bib-level holds, the message will just say that there are
> pending reserves for that bib record.

Are you sure it is relevant? I would like to have others points of view on this alert. Why the librarian would want to have this information?

Maybe Nicole or Katrin could give us their opinion on this?
Comment 10 David Cook 2013-09-15 23:47:57 UTC
(In reply to Jonathan Druart from comment #9)
> (In reply to David Cook from comment #7)
> > If there are item-level holds for items not attached to that order and
> > there are no bib-level holds, the message will just say that there are
> > pending reserves for that bib record.
> 
> Are you sure it is relevant? I would like to have others points of view on
> this alert. Why the librarian would want to have this information?
> 
> Maybe Nicole or Katrin could give us their opinion on this?

I'm not sure that I understand your question. Are you asking why an alert is relevant at all?

Overall, the alert is needed so that library staff can immediately know that there is a hold on the record at hand. This prompts them to process the physical items more quickly than others so that they can fill the hold.

Item-level hold alerts are needed for when a hold has been placed on particular items (the scenario being that items were when "placing an order" or manually before placing the order).

Bibliographic record hold alerts are needed for when there is a hold on the record but no items have been created yet (the scenario being that items are created when "receiving an order" or manually afterwards during cataloguing). 

I suppose there might be scenarios where there is a bibliographic record that has items and there are bib-level holds for that record...and there would be an alert that there are holds on the record when receiving the order even though there are already existing items which may or may not be available to fill that hold. 

However, just a reminder that the record for which they are receiving items seems relevant to me. 

In the libraries I've worked in, records with holds always received a higher priority for processing than records without holds. Without this alert, each record would need to be manually checked for holds and that would slow down the acquisitions process.

I'm happy to hear what others have to say though :)
Comment 11 Katrin Fischer 2013-09-16 04:12:53 UTC
Hm, not sure I understand the question without testing. An alert makes sense, I think, if it's a hold on the record or an item-level hold on one of the on order items. If there are item-level holds on other items - the information might not be needed.

I notice that the patch uses the term "reserves" - I think we try to use "holds" allover to be consistent.
Comment 12 Jonathan Druart 2013-09-16 08:36:40 UTC
(In reply to Katrin Fischer from comment #11)
> Hm, not sure I understand the question without testing. An alert makes
> sense, I think, if it's a hold on the record or an item-level hold on one of
> the on order items. If there are item-level holds on other items - the
> information might not be needed.

Yes, that's it.
You order 3 items (X, Y, Z) for a biblio (in the same order) and a patron places Y on hold (item-level hold). When you receive X or Z, the screen displays "The biblio 'foo' has 3 item-level pending reserves" (not exactly sure what was the exact message).
I was just wondering if it is relevant to get this message since it does not concern the received item.
Comment 13 David Cook 2013-09-17 02:00:09 UTC
(In reply to Jonathan Druart from comment #12)
> (In reply to Katrin Fischer from comment #11)
> > Hm, not sure I understand the question without testing. An alert makes
> > sense, I think, if it's a hold on the record or an item-level hold on one of
> > the on order items. If there are item-level holds on other items - the
> > information might not be needed.
> 
> Yes, that's it.
> You order 3 items (X, Y, Z) for a biblio (in the same order) and a patron
> places Y on hold (item-level hold). When you receive X or Z, the screen
> displays "The biblio 'foo' has 3 item-level pending reserves" (not exactly
> sure what was the exact message).
> I was just wondering if it is relevant to get this message since it does not
> concern the received item.

Ahhh. I understand now. Hmm...that might be true. I can't recall at the moment exactly how receiving items works when items are created during the placing of an order. 

I suppose this probably needs to be investigated. I suppose you might order Volume 1, 2, 3 and biblio 'foo', and there might only be an item-level hold on Volume 2. If you're receiving Volume 1, it wouldn't be relevant to receive a hold notification. 

Hmm. I'll need to poke around at this one some more sometime.
Comment 14 Martin Renvoize 2014-12-17 08:13:40 UTC
Can we get this one moving again... I'm trying ot get some of the older 'In Discussion' bugs on the road again.

David, do you think it's viable to add this granularity to the display of the alert?
Comment 15 Marc Véron 2016-10-03 16:10:04 UTC
Still valid?
Comment 16 Martin Renvoize 2016-10-04 06:11:07 UTC
We have a series of public libraries that are still keen on this.. so I think it's still valid.
Comment 17 David Cook 2016-10-11 06:19:04 UTC
I totally missed Martin's comment on this one...

I don't really have time to work on this at the moment, so happy for someone else to take it over. 

Martin, you could take it over, and I could test it perhaps?