[Bug 17792] New: Introduce Koha::Patron::Attribute(s)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Bug ID: 17792 Summary: Introduce Koha::Patron::Attribute(s) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13757 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13757 [Bug 13757] Make patron attributes editable in the opac if set to 'editable in OPAC' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 58350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58350&action=edit Bug 17792: Introduce Koha::Patron::Attribute(s) This patch introduces stub Koha::Object(s) for handling patron attributes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 58350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58350 Bug 17792: Introduce Koha::Patron::Attribute(s) Review of attachment 58350: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17792&attachment=58350) ----------------------------------------------------------------- ::: 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? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58350|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 58414 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58414&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to M. Tompsett from comment #2)
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?
It was a typo. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 58421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58421&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17755 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17755 [Bug 17755] Introduce Koha::Patron::Attribute::Type(s) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17813 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 [Bug 17813] Table borrower_attributes needs a primary key -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Chris Kirby <chris.kirby@ilsleypubliclibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris.kirby@ilsleypubliclib | |rary.org --- Comment #6 from Chris Kirby <chris.kirby@ilsleypubliclibrary.org> --- I applied the required patches (17755, 177813), then this patch. Tests fail, "No tests run for subtest 'opac_editable() tests'". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #7 from Chris Kirby <chris.kirby@ilsleypubliclibrary.org> --- ^ 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'". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #9 from Chris Kirby <chris.kirby@ilsleypubliclibrary.org> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17826 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17826 [Bug 17826] Allow extended patron attributes to be sent in arbitrary SIP2 fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17828 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17828 [Bug 17828] Koha::Patron::Attribute->store should raise an exception if unique_id is being broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #12 from Chris Kirby <chris.kirby@ilsleypubliclibrary.org> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Note for testers: this patches need to be tested with 13757 applied on top of them. Otherwise some tests will be skipped. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #14 from Chris Kirby <chris.kirby@ilsleypubliclibrary.org> --- (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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Bug 17792 depends on bug 17813, which changed state. Bug 17813 Summary: Table borrower_attributes needs a primary key https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58414|0 |1 is obsolete| | --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 59692 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59692&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58421|0 |1 is obsolete| | --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 59693 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59693&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@bugs.koha-c |y.org |ommunity.org CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Waiting for bug 13757 to QA it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59692|0 |1 is obsolete| | Attachment #59693|0 |1 is obsolete| | --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61553&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61554&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- QAed along withbug 17755 and bug 13757. Please push them altogether. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|17828 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17828 [Bug 17828] Koha::Patron::Attribute->store should raise an exception if unique_id is being broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #22 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Tomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Bug 17792 depends on bug 17755, which changed state. Bug 17755 Summary: Introduce Koha::Patron::Attribute::Type(s) https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17755 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Master |RESOLVED CC| |katrin.fischer@bsz-bw.de --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This won't get ported back to 16.11.x as it is an enhancement. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org