[Bug 33849] New: Duplicate patron warning resets borrowers branch if different than logged in user's branch
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 Bug ID: 33849 Summary: Duplicate patron warning resets borrowers branch if different than logged in user's branch Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: lisette.scheer@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When entering a new patron, if the patron's home library is not the same as the logged-in library of the user + the patron is flagged as a possible duplicate, the patron's home library reverts to the logged in user's library. -- 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=33849 ddemick@oslri.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ddemick@oslri.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emmi.takkinen@koha-suomi.fi --- Comment #1 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- For some reason $op isn't set as "duplicate" (as it should if I understand this correctly). So this condition isn't filled if (defined ($data{'branchcode'}) and ( $op eq 'modify' || $op eq 'duplicate' || ( $op eq 'add' && $category->category_type eq 'C' ) )) { $userbranch = $data{'branchcode'}; } and logged in users branchcode is used instead of selected branchcode. -- 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=33849 --- Comment #2 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- (In reply to Emmi Takkinen from comment #1)
For some reason $op isn't set as "duplicate" (as it should if I understand this correctly). So this condition isn't filled
Actually, $op shouldn't be "duplicate". It's "duplicate" if patron is added with "Duplicate" button.
if (defined ($data{'branchcode'}) and ( $op eq 'modify' || $op eq 'duplicate' || ( $op eq 'add' && $category->category_type eq 'C' ) )) { $userbranch = $data{'branchcode'}; }
and logged in users branchcode is used instead of selected branchcode.
Why to we to this ( $op eq 'add' && $category->category_type eq 'C' )? Shouldn't we use existing branchcode for all patron categorytypes, not only for "C"? And now when I think about this, shouldn't we use existing branchcode no matter what value $op has? -- 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=33849 --- Comment #3 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Did some digging, code comes from bug 6116. Patch says:
When adding a patron who is a child, the default library is not set when defining a guarantor, this patch corrects the problem. More, for children with no guarantors, the default branch is the editing branch.
-- 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=33849 --- Comment #4 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- (In reply to Emmi Takkinen from comment #3)
Did some digging, code comes from bug 6116. Patch says:
When adding a patron who is a child, the default library is not set when defining a guarantor, this patch corrects the problem. More, for children with no guarantors, the default branch is the editing branch.
Actually, it's not this, it's bug 1164. " Fix for bug 1164, child branch not defaulting to guarantor's on add child". It probably fixes the original issue it was supposed to fix, but this definitely causes issues with other patron categories. -- 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=33849 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |emmi.takkinen@koha-suomi.fi |ity.org | Status|NEW |Needs Signoff --- Comment #5 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 164404 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164404&action=edit Bug 33849: Do not reset new patrons home library when error occurs While adding new patron, if patron is flagged as duplicate or another error occurs and their home library differs from library user is logged in, patrons home library resets as logged in users library. This happens with all patrons expect those with category type C. This patch removes checking if patrons category type is C from code so that all category types use previously chosen home library even if error occurs. To test: 1. Add new patron and set their library to a different library than the one you're logged in. 2. Cause an error (wrong age, duplicate etc) while saving. 3. Attempt to save. => Note that patrons home library is set as one you're logged in. 4. Apply this patch. 5. Repeat steps 1 to 3. => Note that patrons home library hasn't changed. Sponsored-by: Koha-Suomi Oy -- 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=33849 --- Comment #6 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Added patch which removes condition where patrons category has to be C to keep home library from changing. As far as I can tell, it doesn't anymore solve issue it did when it was added. When adding guarantor for guarantee, guarantees home library didn't change to same as guarantors. This doesn't happen even if we add guarantee for patron from patrons detail view. If that should happen, we probably need a new bug for that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164404|0 |1 is obsolete| | --- Comment #7 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 164863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164863&action=edit Bug 33849: Do not reset new patrons home library when error occurs While adding new patron, if patron is flagged as duplicate or another error occurs and their home library differs from library user is logged in, patrons home library resets as logged in users library. This happens with all patrons expect those with category type C. This patch removes checking if patrons category type is C from code so that all category types use previously chosen home library even if error occurs. To test: 1. Add new patron and set their library to a different library than the one you're logged in. 2. Cause an error (wrong age, duplicate etc) while saving. 3. Attempt to save. => Note that patrons home library is set as one you're logged in. 4. Apply this patch. 5. Repeat steps 1 to 3. => Note that patrons home library hasn't changed. Sponsored-by: Koha-Suomi Oy Signed-off-by: Esther <esther@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 Esther Melander <esther.melander@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |esther.melander@bywatersolu | |tions.com --- Comment #8 from Esther Melander <esther.melander@bywatersolutions.com> --- This worked according to the test plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 Nick Clemens (kidclamp) <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=33849 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164863|0 |1 is obsolete| | --- Comment #9 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 166554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166554&action=edit Bug 33849: Do not reset new patrons home library when error occurs While adding new patron, if patron is flagged as duplicate or another error occurs and their home library differs from library user is logged in, patrons home library resets as logged in users library. This happens with all patrons expect those with category type C. This patch removes checking if patrons category type is C from code so that all category types use previously chosen home library even if error occurs. To test: 1. Add new patron and set their library to a different library than the one you're logged in. 2. Cause an error (wrong age, duplicate etc) while saving. 3. Attempt to save. => Note that patrons home library is set as one you're logged in. 4. Apply this patch. 5. Repeat steps 1 to 3. => Note that patrons home library hasn't changed. Sponsored-by: Koha-Suomi Oy Signed-off-by: Esther <esther@bywatersolutions.com> 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=33849 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Duplicate patron warning |Duplicate patron warning |resets borrowers branch if |resets patron's library if |different than logged in |different than logged in |user's branch |user's library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.06 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Pushed to stable --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable Version(s)|24.05.00,23.11.06 |24.05.00,23.11.06,23.05.12 released in| | --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33849 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #13 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org