Created attachment 58350 [details] [review] Bug 17792: Introduce Koha::Patron::Attribute(s) This patch introduces stub Koha::Object(s) for handling patron attributes.
Comment on attachment 58350 [details] [review] Bug 17792: Introduce Koha::Patron::Attribute(s) Review of attachment 58350 [details] [review]: ----------------------------------------------------------------- ::: Koha/Patron/Attribute.pm @@ +20,5 @@ > +use base qw(Koha::Object); > + > +=head1 NAME > + > +Koha::Patron;;Category - Koha Patron;;Category Object class Why is this ;;Category?
Created attachment 58414 [details] [review] Bug 17792: Introduce Koha::Patron::Attribute(s) This patch introduces stub Koha::Object(s) for handling patron attributes. Edit: amended the POD to fix C&p mistake
(In reply to M. Tompsett from comment #2) > Comment on attachment 58350 [details] [review] [review] > Bug 17792: Introduce Koha::Patron::Attribute(s) > > Review of attachment 58350 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: Koha/Patron/Attribute.pm > @@ +20,5 @@ > > +use base qw(Koha::Object); > > + > > +=head1 NAME > > + > > +Koha::Patron;;Category - Koha Patron;;Category Object class > > Why is this ;;Category? It was a typo.
Created attachment 58421 [details] [review] Bug 17792: Add opac_editable and opac_display methods This patch adds two methods to the Koha::Patron::Attribute: - opac_display - opac_editable Both method just check the corresponding Koha::Patron::Attribute::Type and return the values for those attributes. This is useful to avoid checking that manually on the controller scripts. To test: - Run: $ prove t/db_dependent/Koha/Patron/Attributes.t => SUCCESS: Tests pass! - Sign off :-D
I applied the required patches (17755, 177813), then this patch. Tests fail, "No tests run for subtest 'opac_editable() tests'".
^ I applied the required patches (17755, 17813), then patch 17792. I then tested, and the tests failed:"No tests run for subtest 'opac_editable() tests'".
(In reply to Chris Kirby from comment #7) > ^ I applied the required patches (17755, 17813), then patch 17792. I then > tested, and the tests failed:"No tests run for subtest 'opac_editable() > tests'". Have you ran the updatedatabase.pl script?
(In reply to Tomás Cohen Arazi from comment #8) > (In reply to Chris Kirby from comment #7) > > ^ I applied the required patches (17755, 17813), then patch 17792. I then > > tested, and the tests failed:"No tests run for subtest 'opac_editable() > > tests'". > > Have you ran the updatedatabase.pl script? I have now. After running "perl installer/data/mysql/updatedatabase.pl" in the koha-shell environment, I had the following output: DEV atomic update: bug_17813_borrower_attributes_pk.sql C4:::Installer::load_sql returned the following errors while attempting to load /home/ckirby/koha/installer/data/mysql/atomicupdate/bug_17813_borrower_attributes_pk.sql:" I had the same error when I ran "koha-upgrade-schema" on my instance.
(In reply to Chris Kirby from comment #6) > I applied the required patches (17755, 177813), then this patch. Tests fail, > "No tests run for subtest 'opac_editable() tests'". Chris, please find me on IRC or email to check what's going on. Things work fine for me.
The unit tests and functionality introduced by the second patch can only be tested in conjunction with bug 13757, which adds the opac_editable attribute. Running the unit tests without 13757 will make the opac_editable() tests fail.
(In reply to Tomás Cohen Arazi from comment #11) > The unit tests and functionality introduced by the second patch can only be > tested in conjunction with bug 13757, which adds the opac_editable > attribute. Running the unit tests without 13757 will make the > opac_editable() tests fail. I applied the patch for 1357 on top of 17792. And then ran the updatedatabase.pl script, which errors out as follows: DEV atomic update: bug_17813_borrower_attributes_pk.sql C4:::Installer::load_sql returned the following errors while attempting to load /home/ckirby/koha/installer/data/mysql/atomicupdate/bug_17813_borrower_attributes_pk.sql:" Is it necessary to update DBIx schema files? I could not successfully run the misc/devel/update_dbix_class_files.pl script.
Note for testers: this patches need to be tested with 13757 applied on top of them. Otherwise some tests will be skipped.
(In reply to Tomás Cohen Arazi from comment #13) > Note for testers: this patches need to be tested with 13757 applied on top > of them. Otherwise some tests will be skipped. applied the following patches:17755, 17813 (followed by updatedatabase.pl), 17792, (followed by updatedatabase.pl), 13757. 13757 doesn't apply cleanly over 17792: https://snag.gy/q4co8z.jpg
(In reply to Chris Kirby from comment #14) > (In reply to Tomás Cohen Arazi from comment #13) > > Note for testers: this patches need to be tested with 13757 applied on top > > of them. Otherwise some tests will be skipped. > > applied the following patches:17755, 17813 (followed by updatedatabase.pl), > 17792, (followed by updatedatabase.pl), 13757. > > 13757 doesn't apply cleanly over 17792: > https://snag.gy/q4co8z.jpg Chris, I fixed that already.
Created attachment 59692 [details] [review] Bug 17792: Introduce Koha::Patron::Attribute(s) This patch introduces stub Koha::Object(s) for handling patron attributes. Edit: amended the POD to fix C&p mistake Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 59693 [details] [review] Bug 17792: Add opac_editable and opac_display methods This patch adds two methods to the Koha::Patron::Attribute: - opac_display - opac_editable Both method just check the corresponding Koha::Patron::Attribute::Type and return the values for those attributes. This is useful to avoid checking that manually on the controller scripts. To test: - Run: $ prove t/db_dependent/Koha/Patron/Attributes.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Waiting for bug 13757 to QA it.
Created attachment 61553 [details] [review] Bug 17792: Introduce Koha::Patron::Attribute(s) This patch introduces stub Koha::Object(s) for handling patron attributes. Edit: amended the POD to fix C&p mistake Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 61554 [details] [review] Bug 17792: Add opac_editable and opac_display methods This patch adds two methods to the Koha::Patron::Attribute: - opac_display - opac_editable Both method just check the corresponding Koha::Patron::Attribute::Type and return the values for those attributes. This is useful to avoid checking that manually on the controller scripts. To test: - Run: $ prove t/db_dependent/Koha/Patron/Attributes.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
QAed along withbug 17755 and bug 13757. Please push them altogether.
Pushed to master for 17.05, thanks Tomas!
This won't get ported back to 16.11.x as it is an enhancement.