Bug 23429 - ilsdi.pl GetRecords documentation does not match output
Summary: ilsdi.pl GetRecords documentation does not match output
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Jon Knight
QA Contact: Josef Moravec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-05 14:09 UTC by Jon Knight
Modified: 2021-06-14 21:29 UTC (History)
2 users (show)

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


Attachments
Bug 23429: ilsdi.pl GetRecords documentation does not match output (3.49 KB, patch)
2019-08-21 14:25 UTC, Jon Knight
Details | Diff | Splinter Review
Bug 23429: ilsdi.pl GetRecords documentation does not match output (3.55 KB, patch)
2019-11-02 23:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23429: ilsdi.pl GetRecords documentation does not match output (3.61 KB, patch)
2019-11-03 16:34 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Knight 2019-08-05 14:09:45 UTC
The ILS-DI GetRecords self generated documentation no longer matches up with the output that the script generates. It probably should. :-)  

For example, the documentation says that the <item> element contains a <date_due> element.  This was the case back in 16.x versions of Koha, but on our production 18.11.04 we no longer get this field, but we do get an <onloan> field in item instead (which luckily serves the same purpose as we need - we just need to know if each item is on loan or not).

Here's the example format for the <item> part of the record generated by http://ourserver/cgi-bin/koha/ilsdi.pl?service=Describe&verb=GetRecords

    <items>
      <item>
        <biblioitemnumber>1</biblioitemnumber>
        <withdrawn>0</withdrawn>
        <holdingbranchname>Bibliothèque Jean Prunier</holdingbranchname>
        <notforloan>0</notforloan>
        <replacementpricedate>2008-08-20</replacementpricedate>
        <itemnumber>1</itemnumber>
        <location>Secteur Adulte</location>
        <itemcallnumber>R ABE</itemcallnumber>
        <date_due></date_due>
        <itemlost>0</itemlost>
        <datelastseen>2008-08-20</datelastseen>
        <homebranch>BIB</homebranch>
        <homebranchname>Bibliothèque Jean Prunier</homebranchname>
        <biblionumber>1</biblionumber>
        <holdingbranch>BIB</holdingbranch>
        <timestamp>2008-08-20 17:15:51</timestamp>
        <damaged>0</damaged>
        <cn_sort>R_ABE</cn_sort>
        <dateaccessioned>2008-08-20</dateaccessioned>
      </item>
    </items>

And here's what we get out for an actual search:

    <items>
      <item>
        <onloan>2019-10-01</onloan>
        <holdingbranch>MAINLIB</holdingbranch>
        <location>MAIN</location>
        <datelastborrowed>2019-07-18</datelastborrowed>
        <biblioitemnumber>526315</biblioitemnumber>
        <permanent_location>MAIN</permanent_location>
        <datelastseen>2019-07-18</datelastseen>
        <withdrawn>0</withdrawn>
        <itype>LONG</itype>
        <notforloan>0</notforloan>
        <biblionumber>526315</biblionumber>
        <itemnumber>847332</itemnumber>
        <price>22.17</price>
        <dateaccessioned>2016-09-13</dateaccessioned>
        <issues>10</issues>
        <homebranchname>Main Library</homebranchname>
        <homebranch>MAINLIB</homebranch>
        <timestamp>2019-07-18 17:03:03</timestamp>
        <cn_sort>005_550000000000000_SPS_BRA</cn_sort>
        <itemlost>0</itemlost>
        <renewals>28</renewals>
        <barcode>040444587X</barcode>
        <damaged>0</damaged>
        <replacementpricedate>2018-02-01</replacementpricedate>
        <itemcallnumber>005.55 SPS/BRA</itemcallnumber>
        <holdingbranchname>Main Library</holdingbranchname>
      </item>
    </items>

Note the <date_due></date_due> in the example is missing from the real output, which has <onloan>...</onloan> instead.

I guess we need to decide if the documentation is just out of date with the code, or if the code should be generating things it isn't any more.
Comment 1 Jon Knight 2019-08-21 14:25:25 UTC
Created attachment 92405 [details] [review]
Bug 23429: ilsdi.pl GetRecords documentation does not match output

Updated contents of Describe for GetRecords to match current behaviour.

To test, ensure ILSDI is configured and then compare the output of:

http://yourserver/cgi-bin/koha/ilsdi.pl?service=Describe&verb=GetRecords

before and after applying the patch. Note that afterwards it includes
things like <onloan> and has removed elements such as <date_due> that no
longer get returned.
Comment 2 Katrin Fischer 2019-11-02 23:07:42 UTC
Created attachment 94978 [details] [review]
Bug 23429: ilsdi.pl GetRecords documentation does not match output

Updated contents of Describe for GetRecords to match current behaviour.

To test, ensure ILSDI is configured and then compare the output of:

http://yourserver/cgi-bin/koha/ilsdi.pl?service=Describe&verb=GetRecords

before and after applying the patch. Note that afterwards it includes
things like <onloan> and has removed elements such as <date_due> that no
longer get returned.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Katrin Fischer 2019-11-02 23:08:06 UTC
Nice improvement, Thx Jon!
Comment 4 Josef Moravec 2019-11-03 16:34:07 UTC
Created attachment 94979 [details] [review]
Bug 23429: ilsdi.pl GetRecords documentation does not match output

Updated contents of Describe for GetRecords to match current behaviour.

To test, ensure ILSDI is configured and then compare the output of:

http://yourserver/cgi-bin/koha/ilsdi.pl?service=Describe&verb=GetRecords

before and after applying the patch. Note that afterwards it includes
things like <onloan> and has removed elements such as <date_due> that no
longer get returned.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Martin Renvoize 2019-11-04 14:54:33 UTC
Nice work!

Pushed to master for 19.11.00