Bug 28238 - Add itemcallnumber to ILS-DI GetAvailability output
Summary: Add itemcallnumber to ILS-DI GetAvailability output
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Koha Team University Lyon 3
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-27 14:55 UTC by Koha Team University Lyon 3
Modified: 2022-02-21 15:11 UTC (History)
9 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds the item call number to the ILS-DI GetAvailability output. This is useful for libraries that use discovery tools as patrons often don't check further for the call number, and then they don't have it when they look for the item.
Version(s) released in:
22.05.00,21.11.03


Attachments
Add itemcallnumber to ilsdi GetAvailability output (3.47 KB, patch)
2021-04-27 14:59 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 28238 Add itemcallnumber to ils-di GetAvailability output (3.51 KB, patch)
2021-05-25 22:39 UTC, David Nind
Details | Diff | Splinter Review
Bug 28328: (follow-up) Add itemcallnumber to ILS-DI GetAvailability output for unavailable items (4.51 KB, patch)
2021-10-26 12:25 UTC, Marion Durand
Details | Diff | Splinter Review
Bug 28238 Add itemcallnumber to ils-di GetAvailability output (3.56 KB, patch)
2021-10-27 04:25 UTC, David Nind
Details | Diff | Splinter Review
Bug 28238: (follow-up) Add itemcallnumber to ILS-DI GetAvailability output for unavailable items (4.56 KB, patch)
2021-10-27 04:26 UTC, David Nind
Details | Diff | Splinter Review
Bug 29374: Don't crash if search engine returns a deleted record (1017 bytes, patch)
2021-10-31 12:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28238: Add itemcallnumber to ils-di GetAvailability output (3.57 KB, patch)
2021-10-31 12:09 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28238: (follow-up) Add itemcallnumber to ILS-DI GetAvailability output for unavailable items (4.61 KB, patch)
2021-10-31 12:09 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28238: (follow-up) Add tests (3.80 KB, patch)
2021-11-09 12:37 UTC, Marion Durand
Details | Diff | Splinter Review
Bug 28238: Add tests (3.95 KB, patch)
2022-01-14 14:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 28238: Add itemcallnumber to ils-di GetAvailability output (3.62 KB, patch)
2022-01-14 14:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 28238: (follow-up) Add itemcallnumber to ILS-DI GetAvailability output for unavailable items (4.67 KB, patch)
2022-01-14 14:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Koha Team University Lyon 3 2021-04-27 14:55:35 UTC
Many libraries use discover tools as front-end to their resources.
These tools are not dealing very well with item specific data such as itemcallnumber. In any case, that's what we observe with Summon, Ex-libris tool wich is not able to map different items with different itemcallnumbers.
That problem can have a solution through GetAvailability method.

After checking availability and getting the location of the document, patrons often don't go further in their search.
When they arrived on the site they are missing only one data : the itemcallnumber.
That would be perfect to add it to the method and so give all minimal but sufficient data to find the document on the place.

Olivier Crouzet
Comment 1 Koha Team University Lyon 3 2021-04-27 14:59:14 UTC
Created attachment 120242 [details] [review]
Add itemcallnumber to ilsdi GetAvailability output
Comment 2 Koha Team University Lyon 3 2021-05-08 09:55:56 UTC
Test plan :

To see the output of getavailability service, run the following url in your browser :

[OPACBASEURL]/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=[BIBLIONUMBER]&id_type=biblio
or this one
[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] a record number and itemnumber of your choice.

After applying the patch, you'll see an extra tag itemcallnumber. 
Exemple :
<dlf:itemcallnumber>840.08 COR R</dlf:itemcallnumber>
Comment 3 David Nind 2021-05-25 22:39:46 UTC
Created attachment 121399 [details] [review]
Bug 28238 Add itemcallnumber to ils-di GetAvailability output

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2021-05-25 22:55:15 UTC
Testing notes (koha-testing-docker):
- Enabled ILS-DI
- Locate a record with multiple items to test with
- Made sure the items had call numbers
- Followed test plan

Note - the QA team may want the commit message formatted according to the commit message guidelines: https://wiki.koha-community.org/wiki/Commit_messages

Here is my attempt:

Bug 28328: Add itemcallnumber to ILS-DI GetAvailability output

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.

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
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 - the results should now have an extra tag itemcallnumber. 
   Example: <dlf:itemcallnumber>840.08 COR R</dlf:itemcallnumber>
6. Sign off!
Comment 5 David Nind 2021-05-25 22:56:51 UTC
Comment on attachment 120242 [details] [review]
Add itemcallnumber to ilsdi GetAvailability output

For some reason I created an additional patch when signing off!
Comment 6 Nick Clemens 2021-07-23 18:43:25 UTC
If we are going to add it, I think we should return it even if item is unavailable - perhaps the patron wants to make a request for it, or to check the surrounding shelves if their item is not available.

Consistency is nice when we can attain it.
Comment 7 Marion Durand 2021-10-26 12:25:11 UTC
Created attachment 126909 [details] [review]
Bug 28328: (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
Comment 8 David Nind 2021-10-27 04:25:59 UTC
Created attachment 126947 [details] [review]
Bug 28238 Add itemcallnumber to ils-di GetAvailability output

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2021-10-27 04:26:03 UTC
Created attachment 126948 [details] [review]
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>
Comment 10 David Nind 2021-10-27 04:27:13 UTC
I amended the commit message for the follow up so that it has the correct bug number.
Comment 11 Marion Durand 2021-10-27 07:13:38 UTC
(In reply to David Nind from comment #10)
> I amended the commit message for the follow up so that it has the correct
> bug number.

Thank you David for the correction. 
I obsoleted the patch with the wrong bug number.
Comment 12 Katrin Fischer 2021-10-31 12:07:55 UTC
Created attachment 127130 [details] [review]
Bug 29374: Don't crash if search engine returns a deleted record

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Katrin Fischer 2021-10-31 12:09:25 UTC
Created attachment 127131 [details] [review]
Bug 28238: Add itemcallnumber to ils-di GetAvailability output

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2021-10-31 12:09:29 UTC
Created attachment 127132 [details] [review]
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>
Comment 15 Katrin Fischer 2021-10-31 12:11:31 UTC
Overall this patch is quite clean, examples and documentation have been updated and existing patches still pass:

prove t/db_dependent/ILSDI_Services.t 
t/db_dependent/ILSDI_Services.t .. ok     
All tests successful.
Files=1, Tests=10, 12 wallclock secs ( 0.02 usr  0.03 sys +  8.42 cusr  1.12 csys =  9.59 CPU)
Result: PASS

I am inclined to pass this change as is, but we are missing a specific test for the new feature. Maybe someone would be willing to step up here?
Comment 16 Jonathan Druart 2021-11-03 13:25:39 UTC
(In reply to Katrin Fischer from comment #15)
> I am inclined to pass this change as is, but we are missing a specific test
> for the new feature. Maybe someone would be willing to step up here?

Yes, I am sorry, no more exceptions.
Comment 17 Marion Durand 2021-11-09 12:37:24 UTC
Created attachment 127478 [details] [review]
Bug 28238: (follow-up) Add tests

Add specific tests for the tag itemcallnumber in GetAvailability output.

Sponsored-by: University Lyon 3
Comment 18 Tomás Cohen Arazi 2022-01-14 14:28:40 UTC
Created attachment 129489 [details] [review]
Bug 28238: Add tests

Add specific tests for the tag itemcallnumber in GetAvailability output.

Sponsored-by: University Lyon 3

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 19 Tomás Cohen Arazi 2022-01-14 14:28:45 UTC
Created attachment 129490 [details] [review]
Bug 28238: Add itemcallnumber to ils-di GetAvailability output

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>
Comment 20 Tomás Cohen Arazi 2022-01-14 14:28:50 UTC
Created attachment 129491 [details] [review]
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>
Comment 21 Fridolin Somers 2022-01-28 21:12:47 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 22 Fridolin Somers 2022-01-28 21:22:05 UTC
I've added the sponsor to release-tools.
There was already "Université Jean Moulin Lyon 3", but prefer english version.
So always patch with line :

Sponsored-by: University Lyon 3
Comment 23 Jonathan Druart 2022-01-31 09:20:01 UTC
(In reply to Fridolin Somers from comment #22)
> I've added the sponsor to release-tools.
> There was already "Université Jean Moulin Lyon 3", but prefer english
> version.
> So always patch with line :
> 
> Sponsored-by: University Lyon 3

Did you ask them? They are in the mailmap as "Université de Lyon 3".
Comment 24 Fridolin Somers 2022-02-01 07:53:52 UTC
I've mailled them directly
Comment 25 Katrin Fischer 2022-02-01 11:47:22 UTC
I think in general the institution should pick what they what want to be listed as. Not everyone has an official English name to use.
Comment 26 Kyle M Hall 2022-02-07 14:36:48 UTC
Pushed to 21.11.x for 21.11.03
Comment 27 Andrew Fuerste-Henry 2022-02-21 15:11:50 UTC
Enhancement, not backported to 21.05.