[Bug 32706] New: User search problem caused by branchcode errors
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 Bug ID: 32706 Summary: User search problem caused by branchcode errors Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: hammat.wele@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Searching users alphabetically fails when there are two similar branchcode types for the same value in the database: one written in uppercase and the second in lowercase Prerequisites 1. Create a new library with library code written in uppercase 1.1. Go to Administration > Libraries 1.2. Click on New library 1.3. Fill in the form Library code = uppercase code (for example TST ) Name = type a name (for example Test category ) 1.4. Save 2. Create several patrons in the TST library 2.1. Go to the patron module 2.2. Click on “new patron” 2.3 Fill the form Surname, First name, Card number, Library (Choose the same 'TST' library for all users that will be created) 2.4. Save Create other users (~10 ) 3. Export users 3.1. Go to the Report module 3.2. Click on Create from SQL 3.3. Type a Report name and paste the following query to the SQL field: SELECT borrowers.cardnumber, borrowers.surname, borrowers.firstname, borrowers.categorycode, borrowers.branchcode, borrowers.dateexpiry FROM borrowers WHERE borrowers.branchcode= <<branchcode|branches>> ORDER BY borrowers.cardnumber asc 4. Click on Save report then on 'Run report' 5. Choose the branch from step 1.3 and Click on Run the report 5. Download report results 6. Import user folders with lowercase branchcode 6.1. Open the file from step 5 6.2. Edit data 6.3. Remove half of the users from the file 6.4. In the "branchcode" column, replace each value with a lowercase branchcode (for example 'tst') 6.5. Save the file in .csv format 6.6. Go to Tools > Patron imports 6.7. upload the file 6.8. Click on Overwrite the existing one with this 6.9. Click on Replace only included patron attributes 6.10. Click on “Import” Test plan 1. Go to the Patron module 2. Click on a letter of the alphabet 'different' from the users created in step 2.2 --> Koha opens the results 3. Choose a last name letter from one of the users created in step 2.2 --> Koha freezes and it leaves the message “Processing” -- 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=32706 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |hammat.wele@inlibro.com |ity.org | CC| |caroline.cyr-la-rose@inlibr | |o.com, | |philippe.blouin@inlibro.com -- 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=32706 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, this sounds similar to bug 32517 that dealt with patron category codes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32517 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 --- Comment #2 from Hammat wele <hammat.wele@inlibro.com> --- Yes it's quite similar, in this case it's the branchcode instead of the categorycode we facing the same problem with the branchcode too but the the js error is «Uncaught TypeError: libraries_map[data] is undefined» -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 --- Comment #3 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 145593 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145593&action=edit Bug 32706: User search problem caused by branchcode errors Searching users alphabetically fails when there are two similar branchcode types for the same value in the database: one written in uppercase and the second in lowercase. Prerequisites 1. Create a new library with library code written in uppercase 1.1. Go to Administration > Libraries 1.2. Click on New library 1.3. Fill in the form Library code = uppercase code (for example TST ) Name = type a name (for example Test category ) 1.4. Save 2. Create several patrons in the TST library 2.1. Go to the patron module 2.2. Click on “new patron” 2.3 Fill the form Surname, First name, Card number, Library (Choose the same 'TST' library for all users that will be created) 2.4. Save Create other users (~10 ) 3. Export users 3.1. Go to the Report module 3.2. Click on Create from SQL 3.3. Type a Report name and paste the following query to the SQL field: SELECT borrowers.cardnumber, borrowers.surname, borrowers.firstname, borrowers.categorycode, borrowers.branchcode, borrowers.dateexpiry FROM borrowers WHERE borrowers.branchcode= <<branchcode|branches>> ORDER BY borrowers.cardnumber asc 4. Click on Save report then on 'Run report' 5. Choose the branch from step 1.3 and Click on Run the report 5. Download report results 6. Import user folders with lowercase branchcode 6.1. Open the file from step 5 6.2. Edit data 6.3. Remove half of the users from the file 6.4. In the 'branchcode' column, replace each value with a lowercase branchcode (for example 'tst') 6.5. Save the file in .csv format 6.6. Go to Tools > Patron imports 6.7. upload the file 6.8. Click on Overwrite the existing one with this 6.9. Click on Replace only included patron attributes 6.10. Click on “Import” Test plan 1. Go to the Patron module 2. Click on a letter of the alphabet 'different' from the users created in step 2.2 --> Koha opens the results 3. Choose a last name letter from one of the users created in step 2.2 --> Koha freezes and it leaves the message 'Processing' 4. Apply the patch 5. Repeat step 1,2,3 --> the results are displayed correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 Hammat wele <hammat.wele@inlibro.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=32706 David Nind <david@davidnind.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=32706 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145593|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 145636 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145636&action=edit Bug 32706: User search problem caused by branchcode errors Searching users alphabetically fails when there are two similar branchcode types for the same value in the database: one written in uppercase and the second in lowercase. Prerequisites 1. Create a new library with library code written in uppercase 1.1. Go to Administration > Libraries 1.2. Click on New library 1.3. Fill in the form Library code = uppercase code (for example TST ) Name = type a name (for example Test category ) 1.4. Save 2. Create several patrons in the TST library 2.1. Go to the patron module 2.2. Click on “new patron” 2.3 Fill the form Surname, First name, Card number, Library (Choose the same 'TST' library for all users that will be created) 2.4. Save Create other users (~10 ) 3. Export users 3.1. Go to the Report module 3.2. Click on Create from SQL 3.3. Type a Report name and paste the following query to the SQL field: SELECT borrowers.cardnumber, borrowers.surname, borrowers.firstname, borrowers.categorycode, borrowers.branchcode, borrowers.dateexpiry FROM borrowers WHERE borrowers.branchcode= <<branchcode|branches>> ORDER BY borrowers.cardnumber asc 4. Click on Save report then on 'Run report' 5. Choose the branch from step 1.3 and Click on Run the report 5. Download report results 6. Import user folders with lowercase branchcode 6.1. Open the file from step 5 6.2. Edit data 6.3. Remove half of the users from the file 6.4. In the 'branchcode' column, replace each value with a lowercase branchcode (for example 'tst') 6.5. Save the file in .csv format 6.6. Go to Tools > Patron imports 6.7. upload the file 6.8. Click on Overwrite the existing one with this 6.9. Click on Replace only included patron attributes 6.10. Click on “Import” Test plan 1. Go to the Patron module 2. Click on a letter of the alphabet 'different' from the users created in step 2.2 --> Koha opens the results 3. Choose a last name letter from one of the users created in step 2.2 --> Koha freezes and it leaves the message 'Processing' 4. Apply the patch 5. Repeat step 1,2,3 --> the results are displayed correctly Signed-off-by: David Nind <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=32706 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- You are inserting incorrect data then expect the software to behave correctly. To me this is a migration problem, not something we should fix in Koha. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- If you want to prevent it, then fix the import tool. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Letting open to let others give their opinion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #7)
Letting open to let others give their opinion.
This is the same than bug 32517 for category codes. I argued similarly there, but I think we should not push one and block the other. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Yes, we should fix import. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #8)
(In reply to Jonathan Druart from comment #7)
Letting open to let others give their opinion.
This is the same than bug 32517 for category codes. I argued similarly there, but I think we should not push one and block the other.
Understand the point. Increasing insight? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|Failed QA |RESOLVED --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thinking more about it, I think this type of fix is a bit dangerous as we cannot tell what other hidden side effects wrong branchcodes will have, I am pretty sure there will be problems in other areas. I've filed a bug to add a capitalization check to the inconsistencies script: Bug 33539 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32706 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33539 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org