Browse Source

Bug 28238: (follow-up) Add itemcallnumber to ILS-DI GetAvailability output for unavailable items

Providing the call number for ILS-DI GetAvailability output is useful
for libraries that use discovery tools. Patrons often don't check
further for the call number, and then they don't have it when they look
for the item. It could also be use full to have this call number when
the item isn't available (to make a request for it for instance).

Test plan:
1. Enable the ILS-DI system preference
2. Locate a record with multiple items and make sure they have call
   numbers for each item and that some are unavailable
3. Test these URLs:
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio
   and
   [OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[ITEMNUMBER]&id_type=item
   (Where the [OPACBASEURL] is the OPAC URL of your test instance,
   [BIBLIONUMBER] and [ITEMNUMBER] are a record number and item number of
   your choice.)
4. Apply the patch
5. Run the queries from step 3 again - all the results should now have
   the tag itemcallnumber (not only the available's ones)
   Example: <dlf:itemcallnumber>840.08 COR R</dlf:itemcallnumber>

Sponsored-by: University Lyon 3

https://bugs.koha-community.org/show_bug.cgi?id=28238

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
22.05.x
Marion Durand 3 years ago
committed by Fridolin Somers
parent
commit
3645d2b26b
  1. 10
      C4/ILSDI/Services.pm
  2. 4
      koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt

10
C4/ILSDI/Services.pm

@ -966,15 +966,15 @@ sub _availability {
my $itemcallnumber = $item->itemcallnumber;
if ( $item->notforloan ) {
return ( $biblionumber, 'not available', 'Not for loan', $location );
return ( $biblionumber, 'not available', 'Not for loan', $location, $itemcallnumber );
} elsif ( $item->onloan ) {
return ( $biblionumber, 'not available', 'Checked out', $location );
return ( $biblionumber, 'not available', 'Checked out', $location, $itemcallnumber );
} elsif ( $item->itemlost ) {
return ( $biblionumber, 'not available', 'Item lost', $location );
return ( $biblionumber, 'not available', 'Item lost', $location, $itemcallnumber );
} elsif ( $item->withdrawn ) {
return ( $biblionumber, 'not available', 'Item withdrawn', $location );
return ( $biblionumber, 'not available', 'Item withdrawn', $location, $itemcallnumber );
} elsif ( $item->damaged ) {
return ( $biblionumber, 'not available', 'Item damaged', $location );
return ( $biblionumber, 'not available', 'Item damaged', $location, $itemcallnumber );
} else {
return ( $biblionumber, 'available', undef, $location, $itemcallnumber );
}

4
koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt

@ -102,7 +102,7 @@
<h2>GetAvailability</h2>
<p>Given a set of bibliographic or item identifiers, returns a
list with availability of the items associated with the identifiers.</p>
list with availability and call number of the items associated with the identifiers.</p>
<h3>Parameters</h3>
<dl>
@ -146,6 +146,7 @@
&lt;dlf:identifier&gt;1&lt;/dlf:identifier&gt;
&lt;dlf:availabilitystatus&gt;available&lt;/dlf:availabilitystatus&gt;
&lt;dlf:location&gt;Bibliothèque Jean Prunier&lt;/dlf:location&gt;
&lt;dlf:itemcallnumber&gt;iPR 8923 W6 L36 1990 c.1&lt;/dlf:itemcallnumber&gt;
&lt;/dlf:simpleavailability&gt;
&lt;/dlf:item&gt;
&lt;/dlf:items&gt;
@ -158,6 +159,7 @@
&lt;dlf:identifier&gt;2&lt;/dlf:identifier&gt;
&lt;dlf:availabilitystatus&gt;available&lt;/dlf:availabilitystatus&gt;
&lt;dlf:location&gt;Bibliothèque Jean Prunier&lt;/dlf:location&gt;
&lt;dlf:itemcallnumber&gt;iPR 8923 W6 L36 1990 c.2&lt;/dlf:itemcallnumber&gt;
&lt;/dlf:simpleavailability&gt;
&lt;/dlf:item&gt;
&lt;/dlf:items&gt;

Loading…
Cancel
Save