Libki / libki-server

Libki Server
Other
55 stars 28 forks source link

Libki wrongly alerts patrons that they have waiting holds if used with Evergreen ILS via SIP #245

Closed kylemhall closed 2 years ago

kylemhall commented 2 years ago

Describe the bug If using SIP integration with the Evergreen ILS, Libki client tells the patron they have holds waiting if they have holds that are not yet waiting.

Expected behavior Patron should be alerted to waiting holds if they have actual waiting holds.

Additional context The issue here is that Koha and Evergreen use the "holds items count" and "unavailable holds count" SIP fields differently. Koha puts waiting holds in the former and non-waiting holds in the latter. Evergreen puts all holds in the former and non-waiting holds in the latter. This means for Evergreen we have to calculate the waiting holds count by subtracting the unavailable holds count from the hold items count.