To recreate: 1 - Enable UseCashRegisters system preference 2 - Create three registers for three different branches 3 - Make each register the default 4 - Click on username in top right 5 - Select 'Set library and cash register' 6 - Choose on of the three branches 7 - Note the dropdown does not populate with the default 8 - Note no registers can be selected
Created attachment 188296 [details] [review] Bug 41071: Fix missing space in cash register classes It seems we dropped a space somewhere so the class for default registers had become: "{Branchcode}default" instead of "{Branchcode} default" This broke the JS for selecting To test: 1 - Enable UseCashRegisters system preference 2 - Create three registers for three different branches 3 - Make each register the default 4 - Click on username in top right 5 - Select 'Set library and cash register' 6 - Choose on of the three branches 7 - Note the dropdown does not populate with the default 8 - Note no registers can be selected 9 - Apply patch 10 - Reload the page 11 - Change libraries and verify all works as expected Current status: Needs Signoff
This is tricky - tidy removes the spaces, I had to commit the patch with --no-verify
Created attachment 188297 [details] [review] Bug 41071: Fix missing space in cash register classes It seems we dropped a space somewhere so the class for default registers had become: "{Branchcode}default" instead of "{Branchcode} default" This broke the JS for selecting To test: 1 - Enable UseCashRegisters system preference 2 - Create three registers for three different branches 3 - Make each register the default 4 - Click on username in top right 5 - Select 'Set library and cash register' 6 - Choose on of the three branches 7 - Note the dropdown does not populate with the default 8 - Note no registers can be selected 9 - Apply patch 10 - Reload the page 11 - Change libraries and verify all works as expected
I changed to adding the space in TT, it's kind of ugly, but maybe better? Moving to QA as trivial and to get attention
(In reply to Nick Clemens (kidclamp) from comment #4) > I changed to adding the space in TT, it's kind of ugly, but maybe better? > Moving to QA as trivial and to get attention This is the correct way to force a space now.
There is one thing: if you go to the form and there is a default, it's not selected automatically. I guess it is not regression from bug 38664 and it was an existing bug.
Created attachment 188308 [details] [review] Bug 41071: Fix missing space in cash register classes It seems we dropped a space somewhere so the class for default registers had become: "{Branchcode}default" instead of "{Branchcode} default" This broke the JS for selecting To test: 1 - Enable UseCashRegisters system preference 2 - Create three registers for three different branches 3 - Make each register the default 4 - Click on username in top right 5 - Select 'Set library and cash register' 6 - Choose on of the three branches 7 - Note the dropdown does not populate with the default 8 - Note no registers can be selected 9 - Apply patch 10 - Reload the page 11 - Change libraries and verify all works as expected Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nice work everyone! Pushed to main for 25.11