tpac scoped current holds counts volume and title holds multiple times

Bug #1170148 reported by Kevin Reed
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Invalid
Undecided
Unassigned

Bug Description

when changed the ctx.record_hold_count in openils/var/templates/opac/parts/record/summary.tt2 to be filled with:

$U->simplereq('open-ils.circ', 'open-ils.circ.bre.holds.count.scoped', $rec_id, $org);

instead of $U->simplereq('open-ils.circ', 'open-ils.circ.bre.holds.count', $rec_id);
the result seems to be miscounting the number of holds.

Current holds
7 current hold with 3 total copies.

record display will add 1 current hold for each copy level hold, and 1 current hold per copy for each volume and each copy level hold

so if a library has 3 copies with the same call number with 1 copy level hold, 1 volume level hold and 1 title level hold it will display
Current holds
7 current hold with 3 total copies.

this seems non intuitive, it would make more sense to add 1 hold per each type of hold which would match what is displayed in the staff client view holds page resulting in:
Current holds
3 current hold with 3 total copies.

Tags: holds tpac
Ben Shum (bshum)
Changed in evergreen:
status: New → Triaged
Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

We have confirmed that in 2.2 this behaviour is present when the TPAC is loaded in a browser. The correct number of holds displays in the staff client's view of the TPAC.

This is on Evergreen 2.2
Postgres 9.1
Ubuntu 10.4

Revision history for this message
Bill Erickson (berick) wrote :

Hi Kevin,

What is "open-ils.circ.bre.holds.count.scoped" ? Is that a custom API call? I'm not finding that code anywhere...

If the goal is to show only holds at the current library, changes to that area of code related to org unit hiding may be of interest (bug #932970 / 2.4).

For example, see the new "pickup_lib_descendant" parameter for "open-ils.circ.bre.holds.count"

http://git.evergreen-ils.org/?p=Evergreen.git;a=commitdiff;h=0e4d2442b88986702a49217fa3fbfaa6b916c5df

Revision history for this message
Kevin Reed (kreed-s) wrote : Re: [Bug 1170148] Re: tpac scoped current holds counts volume and title holds multiple times

Hello Bill
open-ils.circ.bre.holds.count.scoped is a defined call in
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm that i
found in the attempt to get the tpac current holds to only display
holds for that library, i will look into the link, thanks.
-Kevin

Quoting Bill Erickson <email address hidden>:

> Hi Kevin,
>
> What is "open-ils.circ.bre.holds.count.scoped" ? Is that a custom API
> call? I'm not finding that code anywhere...
>
> If the goal is to show only holds at the current library, changes to
> that area of code related to org unit hiding may be of interest (bug
> #932970 / 2.4).
>
> For example, see the new "pickup_lib_descendant" parameter for "open-
> ils.circ.bre.holds.count"
>
> http://git.evergreen-
> ils.org/?p=Evergreen.git;a=commitdiff;h=0e4d2442b88986702a49217fa3fbfaa6b916c5df
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1170148
>
> Title:
> tpac scoped current holds counts volume and title holds multiple times
>
> Status in Evergreen - Open ILS:
> Triaged
>
> Bug description:
> when changed the ctx.record_hold_count in
> openils/var/templates/opac/parts/record/summary.tt2 to be filled
> with:
>
> $U->simplereq('open-ils.circ', 'open-ils.circ.bre.holds.count.scoped',
> $rec_id, $org);
>
> instead of $U->simplereq('open-ils.circ',
> 'open-ils.circ.bre.holds.count', $rec_id);
> the result seems to be miscounting the number of holds.
>
> Current holds
> 7 current hold with 3 total copies.
>
> record display will add 1 current hold for each copy level hold, and 1
> current hold per copy for each volume and each copy level hold
>
>
> so if a library has 3 copies with the same call number with 1 copy
> level hold, 1 volume level hold and 1 title level hold it will
> display
> Current holds
> 7 current hold with 3 total copies.
>
>
> this seems non intuitive, it would make more sense to add 1 hold
> per each type of hold which would match what is displayed in the
> staff client view holds page resulting in:
> Current holds
> 3 current hold with 3 total copies.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/evergreen/+bug/1170148/+subscriptions
>

Revision history for this message
Kevin Reed (kreed-s) wrote :

Bill, yes it seems the scoped call was defined by a previous co-worker.
With some excellent help from Lebbeous we were able to get it returning the proper amount.

I would say this bug can be closed unless the final code would be beneficial to submit to the codebase, i'm not sure how desired having scoped hold counts is.
-Kevin

tags: added: holds
removed: hold scoped
Kathy Lussier (klussier)
Changed in evergreen:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.