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>
This commit is contained in:
parent
f11340a08c
commit
34cb1eb94a
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 @@
|
|||
<dlf:identifier>1</dlf:identifier>
|
||||
<dlf:availabilitystatus>available</dlf:availabilitystatus>
|
||||
<dlf:location>Bibliothèque Jean Prunier</dlf:location>
|
||||
<dlf:itemcallnumber>iPR 8923 W6 L36 1990 c.1</dlf:itemcallnumber>
|
||||
</dlf:simpleavailability>
|
||||
</dlf:item>
|
||||
</dlf:items>
|
||||
|
|
@ -158,6 +159,7 @@
|
|||
<dlf:identifier>2</dlf:identifier>
|
||||
<dlf:availabilitystatus>available</dlf:availabilitystatus>
|
||||
<dlf:location>Bibliothèque Jean Prunier</dlf:location>
|
||||
<dlf:itemcallnumber>iPR 8923 W6 L36 1990 c.2</dlf:itemcallnumber>
|
||||
</dlf:simpleavailability>
|
||||
</dlf:item>
|
||||
</dlf:items>
|
||||
|
|
|
|||
Loading…
Reference in New Issue