Comment on attachment 55685 [details] Email conversation Obsolete email attachment in favor of URL to koha-devel archives: http://lists.koha-community.org/pipermail/koha-devel/2016-September/043075.html Created attachment 55714 [details] [review] GetAvailability "id_type=bib" quick'n dirty implementation To test this patch you should try to send a query to you opac formatted this way : http://[your-opac-domain-name]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[biblionumber]&id_type=bib You should get availability status for all the items of the matched bibliographic record. Created attachment 55775 [details] [review] Bug 17317: ILSDI - Getavailability method with id_type=bib implementation To test this patch you should try to send a query to you opac formatted this way : http://[your-opac-domain-name]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[biblionumber]&id_type=bib You should get availability status for all the items of the matched bibliographic record. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Comment on attachment 55775 [details] [review] Bug 17317: ILSDI - Getavailability method with id_type=bib implementation Review of attachment 55775 [details] [review]: ----------------------------------------------------------------- ::: C4/ILSDI/Services.pm @@ +136,5 @@ > my $msg; > my $biblioitem = ( GetBiblioItemByBiblioNumber( $id, undef ) )[0]; > if ($biblioitem) { > + my $biblioitemnumber = $biblioitem->{'biblioitemnumber'}; > + my $items = (GetItemsByBiblioitemnumber($biblioitemnumber))[0]; I think it would be better to use GetItemnumbersForBiblio instead of GetItemsByBiblioitemnumber, we just need the itemnumbers. Created attachment 55956 [details] [review] Performance Improvement Thank you Jonathan! Created attachment 55970 [details] [review] Bug 17317 ILSDI - Getavailability method with id_type=bib implementation Created attachment 55971 [details] [review] Bug 17317: Perfomance Improvement - Use of GetItemnumbersForBiblio instead of GetItemsByBiblioitemnumber (thx Jonathan Druart) I have just reuploaded the patches (correctly formatted). I'd like to get another signoff on these 2 patches, the structure of the XML has changed (and seems to make more sense). Created attachment 55981 [details] [review] [SIGNED-OFF]Bug 17317: ILSDI: Getavailability method with id_type=bib implementation To test this patch you should try to send a query to you opac formatted this way : http://[your-opac-domain-name]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[biblionumber]&id_type=bib You should get availability status for all the items of the matched bibliographic record. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Created attachment 55982 [details] [review] [SIGNED-OFF]Bug 17317: Perfomance Improvement - Use of GetItemnumbersForBiblio instead of GetItemsByBiblioitemnumber (thx Jonathan Druart) Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Created attachment 58180 [details] [review] Bug 17317: Perfomance Improvement - Use of GetItemnumbersForBiblio instead of GetItemsByBiblioitemnumber (thx Jonathan Druart) Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 58287 [details] [review] Bug 17317: ILSDI: Getavailability method with id_type=bib implementation To test this patch you should try to send a query to you opac formatted this way : http://[your-opac-domain-name]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[biblionumber]&id_type=bib You should get availability status for all the items of the matched bibliographic record. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 58288 [details] [review] Bug 17317: Perfomance Improvement - Use of GetItemnumbersForBiblio instead of GetItemsByBiblioitemnumber (thx Jonathan Druart) Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 17.05, thanks Arthur! This won't get ported back to 16.11.x as it is an enhancement. Created attachment 58469 [details]
Example in 3.22
Katrin, it may be a bug in 16.x if it is a bug in 3.22.10.000 no?
As the ILS-DI Driver lists id_type=bib but it does not return anything. I attached a photo of what I see in 3.22.10 Thanks!
I tested this feature to see if it was safe to go in by not changing the existing behaviour of GetAvailability for 'item'. return_type doesn't seem to be implemented as well? I think that the error page doesn't look good when you give an invalid bibnumber: .../cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=20000&id_type=bib <dlf:collection xsi:schemaLocation="http://diglib.org/ilsdi/1.1 http://diglib.org/architectures/ilsdi/schemas/1.1/dlfexpanded.xsd"><dlf:record><dlf:bibliographic id="20000"/><dlf:items> </dlf:items></dlf:record></dlf:collection> For item it looks like this: <dlf:collection xsi:schemaLocation="http://diglib.org/ilsdi/1.1 http://diglib.org/architectures/ilsdi/schemas/1.1/dlfexpanded.xsd"><dlf:record><dlf:bibliographic id="20000"/><dlf:items><dlf:item id="20000"><dlf:simpleavailability><dlf:identifier>20000</dlf:identifier><dlf:availabilitystatus>unknown</dlf:availabilitystatus><dlf:availabilitymsg>Error: could not retrieve availability for this ID</dlf:availabilitymsg></dlf:simpleavailability></dlf:item></dlf:items></dlf:record></dlf:collection> What do you think? return_type doesn't seem to be implemented as well? |
Created attachment 55685 [details] Email conversation GetAvailability method has some unimplemented features, it is not possible to query availability by biblionumber. Only query for one item at a time is implemented.