Description
Tomás Cohen Arazi (tcohen)
2016-12-29 14:30:46 UTC
Created attachment 58491 [details] [review] Bug 17825: Remove the use of AttributeTypeExists from opac-user.pl With the introducion of Koha::Object-based Koha::Patron::Attribute::Type(s) there's no need for using this function. This patch replaces it with a regular ->search + ->count call. To test: - Have a user with checkouts logged into the OPAC on the opac-user.pl page - Set the SHOW_BCODE attribute to 'no' on the staff interface for the user. - Reload opac-user.pl => SUCCESS: The barcode is not shown for checked out items. - Set the SHOW_BCODE atttribute to 'yes' on the staff interface for the user. - Reload opac-user.pl => SUCCESS: The barcode is shown for checked out items. - Delete the Patron attribute type SHOW_BCODE - Reload opac-user.pl => SUCCESS: No barcode is shown for checked out items - Sign off :-D Created attachment 58492 [details] [review] Bug 17825: (followup) Remove unused function AttributeTypeExists Created attachment 58598 [details] [review] [SIGNED-OFF] Bug 17825: Remove the use of AttributeTypeExists from opac-user.pl With the introducion of Koha::Object-based Koha::Patron::Attribute::Type(s) there's no need for using this function. This patch replaces it with a regular ->search + ->count call. To test: - Have a user with checkouts logged into the OPAC on the opac-user.pl page - Set the SHOW_BCODE attribute to 'no' on the staff interface for the user. - Reload opac-user.pl => SUCCESS: The barcode is not shown for checked out items. - Set the SHOW_BCODE atttribute to 'yes' on the staff interface for the user. - Reload opac-user.pl => SUCCESS: The barcode is shown for checked out items. - Delete the Patron attribute type SHOW_BCODE - Reload opac-user.pl => SUCCESS: No barcode is shown for checked out items - Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 58599 [details] [review] [SIGNED-OFF] Bug 17825: (followup) Remove unused function AttributeTypeExists Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 61713 [details] [review] Bug 17825: Remove the use of AttributeTypeExists from opac-user.pl With the introducion of Koha::Object-based Koha::Patron::Attribute::Type(s) there's no need for using this function. This patch replaces it with a regular ->search + ->count call. To test: - Have a user with checkouts logged into the OPAC on the opac-user.pl page - Set the SHOW_BCODE attribute to 'no' on the staff interface for the user. - Reload opac-user.pl => SUCCESS: The barcode is not shown for checked out items. - Set the SHOW_BCODE atttribute to 'yes' on the staff interface for the user. - Reload opac-user.pl => SUCCESS: The barcode is shown for checked out items. - Delete the Patron attribute type SHOW_BCODE - Reload opac-user.pl => SUCCESS: No barcode is shown for checked out items - Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 61714 [details] [review] Bug 17825: (followup) Remove unused function AttributeTypeExists Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Whaou, never heard about this SHOW_BCODE feature. It is badly coded, should be borrowers DB column, right? (In reply to Jonathan Druart from comment #8) > Whaou, never heard about this SHOW_BCODE feature. It is badly coded, should > be borrowers DB column, right? Definitely! Pushed to master for 17.05, thanks Tomas! Dependency is not in 16.11.x so this should not be needed there. |