[Bug 24215] New: Warnings about guarantor relationships show ARRAY errors
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Bug ID: 24215 Summary: Warnings about guarantor relationships show ARRAY errors Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: About Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Depends on: 14570 Bug 14570 introduced a warning to the about page to catch and display data inconsistencies with respect to guarantor relationships matching te system preference values. However, the warning code is incorrect and therefore instead of the missing values being displayed in a list we get a nasty perl ARRAY(0x55f2846812d0) error. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14570 [Bug 14570] Make it possible to add multiple guarantors to a record -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 96195 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96195&action=edit Bug 24215: Correct display of guarantor relationship errors Test plan: 1) Add some bad data to your borrower_relationships table. ( add or update a relationship such that the 'relationship' field contains a value not listed in the corresponding system preference. 2) Go to the about system information page and note the nasty display of ARRAY(whatever) 3) Apply the patch 4) Repeat step 2 and note that a list of bad values is now displayed instead. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=24215 Kyle M Hall <kyle@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=24215 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96195|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 96208 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96208&action=edit Bug 24215: Correct display of guarantor relationship errors Test plan: 1) Add some bad data to your borrower_relationships table. ( add or update a relationship such that the 'relationship' field contains a value not listed in the corresponding system preference. 2) Go to the about system information page and note the nasty display of ARRAY(whatever) 3) Apply the patch 4) Repeat step 2 and note that a list of bad values is now displayed instead. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- + my $wrong_relationships = [ grep { !$valid_relationships{ $_->[0] } } @{$existing_relationships} ]; + if ( $wrong_relationships or $bad_relationships_count ) { I am expecting this condition to be always true (ARRAYREF) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Confirmed. To recreate: Do nothing, go to about.pl. You see: https://snipboard.io/83ID0r.jpg -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- As this is affecting new 19.11 installations and has come up on the mailing list already, it would be nice to have it fixed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96208|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96395 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96395&action=edit Bug 24215: Correct display of guarantor relationship errors Test plan: 1) Add some bad data to your borrower_relationships table. ( add or update a relationship such that the 'relationship' field contains a value not listed in the corresponding system preference. 2) Go to the about system information page and note the nasty display of ARRAY(whatever) 3) Apply the patch 4) Repeat step 2 and note that a list of bad values is now displayed instead. Signed-off-by: Kyle M Hall <kyle@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=24215 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96396 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96396&action=edit Bug 24215: Do not always display an empty entry 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=24215 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This second patch fixes the following: on a fresh install we do not display anything on the about page (see screenshot on comment 4). However there is still something wrong, but not sure it comes from this patch. When you create a new patron, its relationship field is populated with an empty string, and it seems we are expecting NULL. So we should include "" in this patch, and/or fix the original issue (ie. insert NULL instead of empty string, and update the existing occurrences in DB). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for the followup Jonathan.. I've been struggling to keep up the last few days. An interesting note about NULL vs ""... as you say, feels like that should be fixed at a lower level -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24263 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Martin Renvoize from comment #9)
An interesting note about NULL vs ""... as you say, feels like that should be fixed at a lower level
See bug 24263 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24263 See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24263 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24263 [Bug 24263] borrowers.relationship should not contain an empty string -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Version(s)|20.05.00 |20.05.00, 19.11.02 released in| | Status|Pushed to master |Pushed to stable --- Comment #13 from Joy Nelson <joy@bywatersolutions.com> --- Pushed to 19.11.x branch for 19.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- missing dependency for 19.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |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=24215 Rudolf Byker <rudolfbyker@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rudolfbyker@gmail.com --- Comment #15 from Rudolf Byker <rudolfbyker@gmail.com> --- Sorry to rain on your parade, but after installing 19.11, with no relationships in use whatsoever, I still get this on the about page: ===== The following values have been used for guarantee/guarantor relationships, but do not exist in the 'borrowerRelationship' system preference: [Bullet point with no content] If the relationship is one you want, please add it to the 'borrowerRelationship' system preference, otherwise have your system's administrator correct the values in borrowers.relationship and/or borrower_relationships.relationship in the database. ===== Here is some info about my DB: ===== select relationship, count(*) from borrowers group by relationship; relationship count(*) NULL 6 ===== The borrower_relationships table is empty. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 --- Comment #16 from Joy Nelson <joy@bywatersolutions.com> --- This patch will not be in Koha until the 19.11.02 release which is scheduled for next week. It would not be in 19.11.00 or 19.11.01 (In reply to Rudolf Byker from comment #15)
Sorry to rain on your parade, but after installing 19.11, with no relationships in use whatsoever, I still get this on the about page:
=====
The following values have been used for guarantee/guarantor relationships, but do not exist in the 'borrowerRelationship' system preference:
[Bullet point with no content]
If the relationship is one you want, please add it to the 'borrowerRelationship' system preference, otherwise have your system's administrator correct the values in borrowers.relationship and/or borrower_relationships.relationship in the database.
=====
Here is some info about my DB:
=====
select relationship, count(*) from borrowers group by relationship;
relationship count(*) NULL 6
=====
The borrower_relationships table is empty.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 --- Comment #17 from Joy Nelson <joy@bywatersolutions.com> --- Also, it seems like you are looking for this fix: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24263 which has not yet been pushed to the 19.11.x branch. joy (In reply to Joy Nelson from comment #16)
This patch will not be in Koha until the 19.11.02 release which is scheduled for next week. It would not be in 19.11.00 or 19.11.01
(In reply to Rudolf Byker from comment #15)
Sorry to rain on your parade, but after installing 19.11, with no relationships in use whatsoever, I still get this on the about page:
=====
The following values have been used for guarantee/guarantor relationships, but do not exist in the 'borrowerRelationship' system preference:
[Bullet point with no content]
If the relationship is one you want, please add it to the 'borrowerRelationship' system preference, otherwise have your system's administrator correct the values in borrowers.relationship and/or borrower_relationships.relationship in the database.
=====
Here is some info about my DB:
=====
select relationship, count(*) from borrowers group by relationship;
relationship count(*) NULL 6
=====
The borrower_relationships table is empty.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24215 --- Comment #18 from Rudolf Byker <rudolfbyker@gmail.com> --- Sorry, I misread the third part of the version number! :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org