I can not seem to get extended patron attributes from GetPatronInfo. I propose we add this as an optional parameter (default 0) to ILS-DI GetPatronInfo. ( The use case that triggered this idea was letting people into the library after hours by logging in. We'd then use AuthenticatePatron to log them in and then look at a yes/no flag for those who are trusted to use the after hours service. This flag is coming from a extended patron attribute, but without a clean way to check it this will not work. )
Created attachment 44656 [details] [review] Bug 14257 - Add show_attributes to GetPatronInfo This patch adds the ability to query the extended patron attributes via the ILSDI web service's GetPatronInfo service. Example: ilsdi.pl?service=GetPatronInfo&patron_id=3&show_attributes=1 A new element <attributes> will be added if there are any attributes available from the database. We need to discuss the security implications of showing the attributes. At present it will allow querying of non-public (OPAC-visible) information. We might want to change this. Sponsored-By: Halland County Library
Created attachment 44707 [details] [review] Bug 14257 - Add show_attributes to GetPatronInfo This patch adds the ability to query the extended patron attributes via the ILSDI web service's GetPatronInfo service. Example: ilsdi.pl?service=GetPatronInfo&patron_id=3&show_attributes=1 A new element <attributes> will be added if there are any attributes available from the database. We need to discuss the security implications of showing the attributes. At present it will allow querying of non-public (OPAC-visible) information. We might want to change this. Sponsored-By: Halland County Library Test plan: * Configure Koha to make use of extended attributes: Under 'Administration' -> 'Global system preferences' -> 'Patrons' tab -> Set 'ExtendedPatronAttributes' to 'Enable', press save and switch to 'Web services' tab. * Enable the ILS-DI service: Under 'Administration' -> 'Global system preferences' -> 'Web services' tab -> 'ILS-DI' section: Set 'ILS-DI' to 'Enable' and save. * Create an attribute to query: Under 'Administration' -> 'Patrons and circulation' -> 'Patron attribute types' press 'New patron attribute type': Enter a type code, like 'DOORCODE', description and assign a category that your test patron is a member of, then save. * Set value for test user: Locate the test patron, the new attribute should be listed under 'Additional attributes and identifiers'. Click 'Edit' and assign a value, like '1337' and save. * Query the ILS-DI service: http://127.0.1.1/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=1&show_attributes=1 The output XML should have an element named 'attributes' containing the data you entered.
Created attachment 44864 [details] [review] Bug 14257 - Add show_attributes to GetPatronInfo Added unit tests to for GetBorrowerAttributes and GetPatronInfo. Sponsored-By: Halland County Library
Created attachment 44865 [details] [review] Bug 14257 - Add show_attributes to GetPatronInfo This patch adds the ability to query the extended patron attributes via the ILSDI web service's GetPatronInfo service. Example: ilsdi.pl?service=GetPatronInfo&patron_id=3&show_attributes=1 A new element <attributes> will be added if there are any attributes available from the database. We need to discuss the security implications of showing the attributes. At present it will allow querying of non-public (OPAC-visible) information. We might want to change this. Sponsored-By: Halland County Library Test plan: * Configure Koha to make use of extended attributes: Under 'Administration' -> 'Global system preferences' -> 'Patrons' tab -> Set 'ExtendedPatronAttributes' to 'Enable', press save and switch to 'Web services' tab. * Enable the ILS-DI service: Under 'Administration' -> 'Global system preferences' -> 'Web services' tab -> 'ILS-DI' section: Set 'ILS-DI' to 'Enable' and save. * Create an attribute to query: Under 'Administration' -> 'Patrons and circulation' -> 'Patron attribute types' press 'New patron attribute type': Enter a type code, like 'DOORCODE', description and assign a category that your test patron is a member of, then save. * Set value for test user: Locate the test patron, the new attribute should be listed under 'Additional attributes and identifiers'. Click 'Edit' and assign a value, like '1337' and save. * Query the ILS-DI service: http://127.0.1.1/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=1&show_attributes=1 The output XML should have an element named 'attributes' containing the data you entered.
Created attachment 49579 [details] [review] Bug 14257 - Add show_attributes to GetPatronInfo This patch adds the ability to query the extended patron attributes via the ILSDI web service's GetPatronInfo service. Example: ilsdi.pl?service=GetPatronInfo&patron_id=3&show_attributes=1 A new element <attributes> will be added if there are any attributes available from the database. We need to discuss the security implications of showing the attributes. At present it will allow querying of non-public (OPAC-visible) information. We might want to change this. Sponsored-By: Halland County Library Test plan: * Configure Koha to make use of extended attributes: Under 'Administration' -> 'Global system preferences' -> 'Patrons' tab -> Set 'ExtendedPatronAttributes' to 'Enable', press save and switch to 'Web services' tab. * Enable the ILS-DI service: Under 'Administration' -> 'Global system preferences' -> 'Web services' tab -> 'ILS-DI' section: Set 'ILS-DI' to 'Enable' and save. * Create an attribute to query: Under 'Administration' -> 'Patrons and circulation' -> 'Patron attribute types' press 'New patron attribute type': Enter a type code, like 'DOORCODE', description and assign a category that your test patron is a member of, then save. * Set value for test user: Locate the test patron, the new attribute should be listed under 'Additional attributes and identifiers'. Click 'Edit' and assign a value, like '1337' and save. * Query the ILS-DI service: http://127.0.1.1/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=1&show_attributes=1 The output XML should have an element named 'attributes' containing the data you entered. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 49580 [details] [review] Bug 14257 - Add show_attributes to GetPatronInfo Added unit tests to for GetBorrowerAttributes and GetPatronInfo. Sponsored-By: Halland County Library Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 49581 [details] [review] Bug 14257 - Add show_attributes to GetPatronInfo This patch adds the ability to query the extended patron attributes via the ILSDI web service's GetPatronInfo service. Example: ilsdi.pl?service=GetPatronInfo&patron_id=3&show_attributes=1 A new element <attributes> will be added if there are any attributes available from the database. We need to discuss the security implications of showing the attributes. At present it will allow querying of non-public (OPAC-visible) information. We might want to change this. Sponsored-By: Halland County Library Test plan: * Configure Koha to make use of extended attributes: Under 'Administration' -> 'Global system preferences' -> 'Patrons' tab -> Set 'ExtendedPatronAttributes' to 'Enable', press save and switch to 'Web services' tab. * Enable the ILS-DI service: Under 'Administration' -> 'Global system preferences' -> 'Web services' tab -> 'ILS-DI' section: Set 'ILS-DI' to 'Enable' and save. * Create an attribute to query: Under 'Administration' -> 'Patrons and circulation' -> 'Patron attribute types' press 'New patron attribute type': Enter a type code, like 'DOORCODE', description and assign a category that your test patron is a member of, then save. * Set value for test user: Locate the test patron, the new attribute should be listed under 'Additional attributes and identifiers'. Click 'Edit' and assign a value, like '1337' and save. * Query the ILS-DI service: http://127.0.1.1/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=1&show_attributes=1 The output XML should have an element named 'attributes' containing the data you entered. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Just 2 notes for now: - we need to update the documentation - there is a typo hiding somewhere: FAIL spelling comparision ==> comparison
Created attachment 49669 [details] [review] Bug 14257: Follow-up - Add documentation, fix typo, fix test - t/db_dependent/ILSDI_Services.t was failing for me as I had issues in my database, fixed with another delete line - QA tools found a typo - comparision - Added documentation of the new parameter to the ilsdi.pl page
Still working on this!
Created attachment 49696 [details] [review] [PASSED QA] Bug 14257 - Add show_attributes to GetPatronInfo Added unit tests to for GetBorrowerAttributes and GetPatronInfo. Sponsored-By: Halland County Library Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 49697 [details] [review] [PASSED QA] Bug 14257 - Add show_attributes to GetPatronInfo This patch adds the ability to query the extended patron attributes via the ILSDI web service's GetPatronInfo service. Example: ilsdi.pl?service=GetPatronInfo&patron_id=3&show_attributes=1 A new element <attributes> will be added if there are any attributes available from the database. We need to discuss the security implications of showing the attributes. At present it will allow querying of non-public (OPAC-visible) information. We might want to change this. Sponsored-By: Halland County Library Test plan: * Configure Koha to make use of extended attributes: Under 'Administration' -> 'Global system preferences' -> 'Patrons' tab -> Set 'ExtendedPatronAttributes' to 'Enable', press save and switch to 'Web services' tab. * Enable the ILS-DI service: Under 'Administration' -> 'Global system preferences' -> 'Web services' tab -> 'ILS-DI' section: Set 'ILS-DI' to 'Enable' and save. * Create an attribute to query: Under 'Administration' -> 'Patrons and circulation' -> 'Patron attribute types' press 'New patron attribute type': Enter a type code, like 'DOORCODE', description and assign a category that your test patron is a member of, then save. * Set value for test user: Locate the test patron, the new attribute should be listed under 'Additional attributes and identifiers'. Click 'Edit' and assign a value, like '1337' and save. * Query the ILS-DI service: http://127.0.1.1/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=1&show_attributes=1 The output XML should have an element named 'attributes' containing the data you entered. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 49698 [details] [review] Bug 14257: Follow-up - Add documentation, fix typo, fix test - t/db_dependent/ILSDI_Services.t was failing for me as I had issues in my database, fixed with another delete line - QA tools found a typo - comparision - Added documentation of the new parameter to the ilsdi.pl page
Pushed to Master - Should be in the May 2016 release. Thanks!
I am currently working on moving this code the Koha namespace and I do not understand what is needed exactly here. So far we have: <attributes> <code>xxx</code> <value>1</value> <class/> <value_description>Damaged</value_description> <description>pouet peout</description> <display_checkout>0</display_checkout> </attributes> Maybe we just need a couple variable=value, right?