[Bug 21083] New: Batch patron modification does not allow to modify repeatable patron attributes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Bug ID: 21083 Summary: Batch patron modification does not allow to modify repeatable patron attributes Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 20443 This has been a limitation of the script since it has been integrated in to Koha (see bug 12636). I would like to see bug 20443 pushed and then could work on fixing this one. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20443 [Bug 20443] Move C4::Members::Attributes to Koha namespace -- 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=21083 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=12636 | Depends on| |15367 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It's not bug 12636 but bug 15367 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15367 [Bug 15367] Batch patron modification: Data loss with multiple repeatable patron attributes -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=21083 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 105201 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105201&action=edit Bug 21083: Handle repeatable patron attributes in batch patron modification tool This patch adds the ability to set patron attributes marked as repeatable in the batch patron modification tool. Prior to this patch they were ignored. Test plan: You should try with several combinaisons and set patron attributes using the batch patron modification tool. Make sure there is no data lose and that the result is what you expect Please detail in a comment what you tested. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Severity|normal |enhancement -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think the following changes should be applied to Koha::Patron->extended_attributes diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 5436ccc448..cf8264a308 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1482,6 +1482,9 @@ sub extended_attributes { # Insert the new ones for my $attribute (@$attributes) { + # FIXME It seems that we need this check here + next if $attribute->category_code && $attribute->category_code ne $self->categorycode; + eval { $self->_result->create_related('borrower_attributes', $attribute); }; However it's not needed for this bug report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr Status|Needs Signoff |Failed QA --- Comment #4 from Séverine Queune <severine.queune@bulac.fr> --- I not sure I totally understood the expected behaviour of this patch, but here as some feedback about my first quick tests. If patrons have several entries for one attribute, the batch modification replace all the attributes by only the new value. I assume so but can you confirm it's the behaviour expected ? I also noticed : - when I check the box to empty the field, I still have empty entries in database instead of having no entries at all, e.g; : select * from borrower_attributes --> id borrowernumber code attribute --> 124 21 disc Maths --> 125 21 disc --> 126 21 disc Maths Shouldn't line 125 have been deleted ? -you can create several empty datas : to reproduce, select an attribute, checkbox the box, add the same attribute and check the box again. Is there a way to lock the use of an attribute that is selected 'to delete' ? Expect that points, I've tests with both free input and authorized values linked attributes and it seems to work quite fine. Failed though for the empty data issues in borrower_attributes table. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 133104 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133104&action=edit Bug 21083: Remove all attributes not only the first one -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Hi Séverine, I think this patch should fix the problems you found. (In reply to Séverine Queune from comment #4)
I not sure I totally understood the expected behaviour of this patch, but here as some feedback about my first quick tests.
If patrons have several entries for one attribute, the batch modification replace all the attributes by only the new value. I assume so but can you confirm it's the behaviour expected ?
I think so :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105201|0 |1 is obsolete| | Attachment #133104|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 149749 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149749&action=edit Bug 21083: Handle repeatable patron attributes in batch patron modification tool This patch adds the ability to set patron attributes marked as repeatable in the batch patron modification tool. Prior to this patch they were ignored. Test plan: You should try with several combinaisons and set patron attributes using the batch patron modification tool. Make sure there is no data lose and that the result is what you expect Please detail in a comment what you tested. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 149750 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149750&action=edit Bug 21083: Remove all attributes not only the first one -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Did you see bug 33156? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Katrin Fischer from comment #9)
Did you see bug 33156?
Why are you asking? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Because it fixes JavaScript error breaking functionality with the patron attributes on that page. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- If you are testing this bug it is probably good to know about this one which may effect your ability to test: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33638 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=21083 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149749|0 |1 is obsolete| | --- Comment #13 from Philip Orr <philip.orr@lmscloud.de> --- Created attachment 152707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152707&action=edit Bug 21083: Handle repeatable patron attributes in batch patron modification tool This patch adds the ability to set patron attributes marked as repeatable in the batch patron modification tool. Prior to this patch they were ignored. Test plan: You should try with several combinaisons and set patron attributes using the batch patron modification tool. Make sure there is no data lose and that the result is what you expect Please detail in a comment what you tested. Signed-off-by: Philip Orr <philip.orr@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149750|0 |1 is obsolete| | --- Comment #14 from Philip Orr <philip.orr@lmscloud.de> --- Created attachment 152708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152708&action=edit Bug 21083: Remove all attributes not only the first one Signed-off-by: Philip Orr <philip.orr@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philip.orr@lmscloud.de --- Comment #15 from Philip Orr <philip.orr@lmscloud.de> --- First thing I tested was to create a new borrower attribute with the name "School class" with nothing checked (so not repeatable), also not linked to any authorized values. It showed up in patron batch modification and worked correctly, the patrons I batch modified had the value I specified ("3a") added to their attribute. Then I tried setting the borrower attribute to repeatable. It still shows up in patron modification, so that's good. I tried setting a new value for the same patrons ("4b"). The old value "3a" was overwritten by the new value "4b", so that worked correctly. Then I manually gave each patron 3 separate values for the "School class" attribute, "3a", "4b" and "5c". Then I went back to patron modification and used batch patron modification to give them a new value "6d". This resulted in all of the previous values being deleted and instead the new value was saved. So instead of having three separate "School class" attributes, they now only had one with the value "6d". So that worked correctly as well. I then tried giving the patrons multiple "School class" values in the same batch patron modification and that worked as expected too: the old value "6d" was deleted and the multiple new values "3a", "6y" and "12b" were created for each patron. Then I thought it might be a good idea to test if I could change multiple different borrower attributes in the same batch patron modification. Unfortunately that doesn't work very well, as soon as one the borrower attributes is connected to an authorized value (in this case our usual attribute "Show barcode" connected to the authorized value YES_NO) then in batch patron modification all the text entry fields for all borrower attributes are changed to authorized value drop down fields. So I couldn't edit "School class" and "Show barcode" at the same time in batch patron modification. I don't know if that's already an existing bug or if I should make a new bug for that. Anyway besides that everything works as expected. Only the currently saved borrower attributes "3a", "6y" and "12b" are found in borrower_attributes: SELECT * FROM borrower_attributes id borrowernumber code attribute 38 47 CLASS 3a 39 47 CLASS 6y 40 47 CLASS 12b 41 18 CLASS 3a 42 18 CLASS 6y 43 18 CLASS 12b 44 12 CLASS 3a 45 12 CLASS 6y 46 12 CLASS 12b 47 16 CLASS 3a 48 16 CLASS 6y 49 16 CLASS 12b -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Nick Clemens <nick@bywatersolutions.com> 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=21083 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152707|0 |1 is obsolete| | Attachment #152708|0 |1 is obsolete| | --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 153421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153421&action=edit Bug 21083: Handle repeatable patron attributes in batch patron modification tool This patch adds the ability to set patron attributes marked as repeatable in the batch patron modification tool. Prior to this patch they were ignored. Test plan: You should try with several combinaisons and set patron attributes using the batch patron modification tool. Make sure there is no data lose and that the result is what you expect Please detail in a comment what you tested. Signed-off-by: Philip Orr <philip.orr@lmscloud.de> 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=21083 --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 153422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153422&action=edit Bug 21083: Remove all attributes not only the first one Signed-off-by: Philip Orr <philip.orr@lmscloud.de> 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=21083 --- Comment #18 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 153423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153423&action=edit Bug 21083: (QA follow-up) Add a hint that attributes will replace all existing attributes 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=21083 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34274 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34274 [Bug 34274] In batch patron modification adding a new attribute clears all existing values and applies authorised values to all attributes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #20 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement or bug ? Needs backport right ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34818 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34818 [Bug 34818] Cannot perform batch patron modification without selecting a patron attribute -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 hebah@bywatersolutions.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hebah@bywatersolutions.com --- Comment #21 from hebah@bywatersolutions.com --- Backport to 23.05 would be great. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_23_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21083 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38266 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38266 [Bug 38266] Bug 21083 follow-up Incorrect attribute disabled in borrower batch modification -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org