Bug 12469 - Add more information to the ILS-DI results
Summary: Add more information to the ILS-DI results
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P4 enhancement
Assignee: Arthur Suzuki
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-24 02:23 UTC by Robin Sheat
Modified: 2022-02-28 18:16 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 12469 - make ILS-DI include the call number. (1.11 KB, patch)
2014-06-24 03:31 UTC, Robin Sheat
Details | Diff | Splinter Review
Bug 12469 - make ILS-DI include the call number. (1.12 KB, patch)
2014-06-24 23:54 UTC, Robin Sheat
Details | Diff | Splinter Review
Bug 12469 - add due dates to the ILSDI interface (2.21 KB, patch)
2014-06-24 23:57 UTC, Robin Sheat
Details | Diff | Splinter Review
Bug 12469: make ILS-DI include the call number. (1.28 KB, patch)
2020-01-27 02:54 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 12469: add due dates to the ILSDI interface (2.36 KB, patch)
2020-01-27 02:54 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 12469: Moved callnumber to a specific XML node in reply (4.97 KB, patch)
2020-01-27 02:54 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 12469: Added Unit tests for GetAvailability (2.02 KB, patch)
2020-01-27 02:55 UTC, Arthur Suzuki
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Sheat 2014-06-24 02:23:13 UTC
In particular:

Including callnumber in the location result (as provided by example in the spec at http://old.diglib.org/architectures/ilsdi/DLF_ILS_Discovery_1.1.pdf on page 71)

Adding a dateavailable field for items that are on issue.
Comment 1 Robin Sheat 2014-06-24 03:31:49 UTC Comment hidden (obsolete)
Comment 2 Robin Sheat 2014-06-24 23:54:36 UTC
Created attachment 29201 [details] [review]
Bug 12469 - make ILS-DI include the call number.

This has ILS-DI include the call number as part of the human-readable
location field. It is included in the same form as the examples in the
specification.

Test plan:
* Hit an ILS-DI URL like:
http://koha/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=1+2+1781&id_type=item
* see that the lication information is now "Branch, Call # 123.4 ABC"
Comment 3 Robin Sheat 2014-06-24 23:57:46 UTC
Created attachment 29202 [details] [review]
Bug 12469 - add due dates to the ILSDI interface

This adds the dlf:dateavailable field to ILSDI item availability
information if an item is currently checked out.

Test plan:
* Hit the ILSDI GetAvailability URL for an issued item
* See that it now has the return date
Comment 4 Koha Team University Lyon 3 2016-12-08 09:19:15 UTC
Hi,
Is someone still working on this ?
Cheers,
Sonia
Comment 5 Arthur Suzuki 2019-02-12 11:38:28 UTC
Also, items in a transfer between two branches are shown as available.

Maybe this status could be checked and changed from :
<dlf:availabilitystatus>available</dlf:availabilitystatus>

to :

<dlf:availabilitystatus>not available</dlf:availabilitystatus>
<dlf:availabilitymsg>Transfer</dlf:availabilitymsg>
Comment 6 Katrin Fischer 2019-04-03 20:50:00 UTC
(In reply to Koha Team Lyon 3 from comment #4)
> Hi,
> Is someone still working on this ?
> Cheers,
> Sonia

As Robin no longer works on Koha, I think this is up for adoption.
Comment 7 Arthur Suzuki 2019-05-27 14:02:14 UTC
Adopted :)
Comment 8 Arthur Suzuki 2020-01-27 02:54:10 UTC
Created attachment 97955 [details] [review]
Bug 12469: make ILS-DI include the call number.

This has ILS-DI include the call number as part of the human-readable
location field. It is included in the same form as the examples in the
specification.

Test plan:
* Hit an ILS-DI URL like:
http://koha/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=1+2+1781&id_type=item
* see that the location information is now "Branch, Call # 123.4 ABC"
Comment 9 Arthur Suzuki 2020-01-27 02:54:38 UTC
Created attachment 97956 [details] [review]
Bug 12469: add due dates to the ILSDI interface

This adds the dlf:dateavailable field to ILSDI item availability
information if an item is currently checked out.

Test plan:
* Hit the ILSDI GetAvailability URL for an issued item
* See that it now has the return date
Comment 10 Arthur Suzuki 2020-01-27 02:54:55 UTC
Created attachment 97957 [details] [review]
Bug 12469: Moved callnumber to a specific XML node in reply
Comment 11 Arthur Suzuki 2020-01-27 02:55:09 UTC
Created attachment 97958 [details] [review]
Bug 12469: Added Unit tests for GetAvailability
Comment 12 David Nind 2020-02-08 03:58:03 UTC
I don't really understand anything about ILS-DI, but from working through the tests:

1) Showing the branch and call number works fine

2) Running the tests (prove t/db_dependent/ILSDI_Services.t): the tests pass, but there is one warning:

root@a08c360ba7cc:koha(bz12469)$ prove t/db_dependent/ILSDI_Services.t
t/db_dependent/ILSDI_Services.t .. 6/10 Use of uninitialized value $charge in numeric gt (>) at /kohadevbox/koha/C4/Circulation.pm line 2978.
t/db_dependent/ILSDI_Services.t .. ok     
All tests successful.
Files=1, Tests=10,  9 wallclock secs ( 0.03 usr  0.00 sys +  7.59 cusr  1.12 csys =  8.74 CPU)
Result: PASS

3) Adding due dates: this seems to only show the current date and time - for a record with 2 items, I checked one out (item 22 - due date 26 February 2020) and the other was available (item 21); with the URL cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=21+22&id_type=item I get this result returned as XML - availability status is 'available' and 'dateavailable' is the same for both:

<dlf:collection xmlns:dlf="http://diglib.org/ilsdi/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://diglib.org/ilsdi/1.1 http://diglib.org/architectures/ilsdi/schemas/1.1/dlfexpanded.xsd">
<dlf:record>
 <dlf:bibliographic id="7"/>
 <dlf:items>
  <dlf:item id="21">
   <dlf:simpleavailability>
    <dlf:identifier>21</dlf:identifier>
    <dlf:availabilitystatus>available</dlf:availabilitystatus>
    <dlf:location>Fairview</dlf:location>
    <dlf:callnumber>947.084/1092 B</dlf:callnumber>
    <dlf:dateavailable>2020-02-08T03:36:40</dlf:dateavailable>
   </dlf:simpleavailability>
  </dlf:item>
 </dlf:items>
</dlf:record>
<dlf:record>
 <dlf:bibliographic id="7"/>
 <dlf:items>
  <dlf:item id="22">
   <dlf:simpleavailability>
    <dlf:identifier>22</dlf:identifier>
    <dlf:availabilitystatus>available</dlf:availabilitystatus>
    <dlf:location>Centerville</dlf:location>
    <dlf:callnumber>947.084/1092 B</dlf:callnumber>
    <dlf:dateavailable>2020-02-08T03:36:40</dlf:dateavailable>
    </dlf:simpleavailability>
  </dlf:item>
 </dlf:items>
</dlf:record>
</dlf:collection>

If this is what is expected I'm happy to it off.
Comment 13 David Nind 2020-02-08 03:59:01 UTC
That last sentence should say "If this is what is expected I'm happy to sign it off."
Comment 14 David Nind 2020-04-01 06:59:25 UTC
Sorry Arthur, now that I'm a bit more familiar with ILS-DI I've retested and found some issues 8-(:

1) Showing the call number works fine.

2) The branch shows, but is incorrect when the item is checked out. In the ILS-DI results below item 21 belongs to Centerville and item 22 belongs to Fairview, but Centerville is shown for both.
 
3) The tests now fail:

root@d3e7d16216fc:koha(bz12469)$ prove t/db_dependent/ILSDI_Services.t
t/db_dependent/ILSDI_Services.t .. 7/10 Use of uninitialized value $charge in numeric gt (>) at /kohadevbox/koha/C4/Circulation.pm line 3007.
t/db_dependent/ILSDI_Services.t .. 9/10 # Looks like you planned 10 tests but ran 11.
t/db_dependent/ILSDI_Services.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
All 10 subtests passed 

Test Summary Report
-------------------
t/db_dependent/ILSDI_Services.t (Wstat: 65280 Tests: 11 Failed: 1)
  Failed test:  11
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 10 tests but ran 11.
Files=1, Tests=11, 12 wallclock secs ( 0.04 usr  0.00 sys +  8.52 cusr  1.08 csys =  9.64 CPU)
Result: FAIL

4) Adding due dates: this seems to only show the current date and time - for a record with 2 items, I checked both out (item 21 and 22 - due date 6 April 2020 for both); with the URL cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=21+22&id_type=item I get the ILS-DI results returned below - availability status is 'available' and 'dateavailable' is the currentt date for both.

ILS-DI Results
--------------

<dlf:collection xmlns:dlf="http://diglib.org/ilsdi/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://diglib.org/ilsdi/1.1 http://diglib.org/architectures/ilsdi/schemas/1.1/dlfexpanded.xsd">
<dlf:record>
 <dlf:bibliographic id="7"/>
  <dlf:items>
   <dlf:item id="21">
   <dlf:simpleavailability>
    <dlf:identifier>21</dlf:identifier>
    <dlf:availabilitystatus>available</dlf:availabilitystatus>
    <dlf:location>Centerville</dlf:location>
    <dlf:callnumber>947.084/1092 B</dlf:callnumber>
    <dlf:dateavailable>2020-04-01T06:35:10</dlf:dateavailable>
   </dlf:simpleavailability>
  </dlf:item>
  </dlf:items>
</dlf:record>
<dlf:record>
 <dlf:bibliographic id="7"/>
  <dlf:items>
  <dlf:item id="22">
  <dlf:simpleavailability>
   <dlf:identifier>22</dlf:identifier>
   <dlf:availabilitystatus>available</dlf:availabilitystatus>
   <dlf:location>Centerville</dlf:location>
   <dlf:callnumber>947.084/1092 B</dlf:callnumber>
   <dlf:dateavailable>2020-04-01T06:35:10</dlf:dateavailable>
  </dlf:simpleavailability>
  </dlf:item>
 </dlf:items>
</dlf:record>
</dlf:collection>
Comment 15 Koha Team University Lyon 3 2022-02-28 18:16:57 UTC
Hi, 
I don't know for the return date but the callnumber is now part of the ilsi result : cf https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28238

Sonia