Summary: | Cannot search cashups using non-latin-1 scripts | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | REST API | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | arthur.suzuki, david, dcook, lucas, martin.renvoize, tomascohen, wainuiwitikapark |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32406 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the cashup history table so that filters can use non latin-1 characters (Point of sale > Cash summary for <library> > select register). Before this fix, the table was not filtered or refreshed if you entered non latin-1 characters.
|
Version(s) released in: |
23.05.00,22.11.03,22.05.10,21.11.16
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 32401 | ||
Attachments: |
Bug 32409: Fix cashup searching with non latin-1 chars
Bug 32409: Fix cashup searching with non latin-1 chars Bug 32409: Fix cashup searching with non latin-1 chars |
Description
Tomás Cohen Arazi (tcohen)
2022-12-06 13:49:48 UTC
Created attachment 144449 [details] [review] Bug 32409: Fix cashup searching with non latin-1 chars This patch fixes a problem with the way queries are passed to the API so cashups are searchable with non-laint1 chars. To test: 1. Have two superlibrarian users, one with non-latin1 chars on the name (e.g. خمسة) 2. Setup a debit type that can be sold. 3. Use the POS module to have some activity, using both your regular user and the other one. 4. Go to the register you used, and choose 'Transaction history' 5. Perform a couple cashups with each user ('Record cashup'). 6. Look at the 'Cashup history' table => SUCCESS: You see cashups for both users 7. Use the 'Search' filter with latin chars => SUCCESS: Your user with only latin1 chars is displayed on the table 8. Repeat, using some non-latin1 char found on the other user => FAIL: Table is not refreshed or filtered! 9. Apply this patch 10. Reload the page 11. Repeat 8 => SUCCESS: Filtering works now! 12. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 144461 [details] [review] Bug 32409: Fix cashup searching with non latin-1 chars This patch fixes a problem with the way queries are passed to the API so cashups are searchable with non-laint1 chars. To test: 1. Have two superlibrarian users, one with non-latin1 chars on the name (e.g. خمسة) 2. Setup a debit type that can be sold. 3. Use the POS module to have some activity, using both your regular user and the other one. 4. Go to the register you used, and choose 'Transaction history' 5. Perform a couple cashups with each user ('Record cashup'). 6. Look at the 'Cashup history' table => SUCCESS: You see cashups for both users 7. Use the 'Search' filter with latin chars => SUCCESS: Your user with only latin1 chars is displayed on the table 8. Repeat, using some non-latin1 char found on the other user => FAIL: Table is not refreshed or filtered! 9. Apply this patch 10. Reload the page 11. Repeat 8 => SUCCESS: Filtering works now! 12. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> I would like to QA this one, but the instructions in the test plan aren't detailed enough. I can't get to "Transaction history" or "Cashup history". Leaving this for someone else to do unless a new test plan is added. (In reply to David Cook from comment #3) > I would like to QA this one, but the instructions in the test plan aren't > detailed enough. I can't get to "Transaction history" or "Cashup history". > > Leaving this for someone else to do unless a new test plan is added. Some notes on setting up for testing: 1. Enable the UseCashRegisters system preference. 2. Enabled the EnablePointOfSale system preference. 3. Create a cash register for Centerville (Administration > New cash register > call it CASH). 4. Add some debit types for some products from Administration > Accounting > Debit types > New debit type (change the code, description, and amount to add multiple debit types): - Debit type code: PRODUCT1 - Default amount: 10.00 - Description: Description for product 1 - Can be manually invoiced? Selected - Can be sold?: Selected 5. Add some POS transactions using the koha user from Home > Point of sale 6. Select 'Transaction history for CASH' from the menu on the left. 7. Select the 'Record cashup' from the option at the top. 6. Repeat steps 5-7 as the other staff user created in step 1 of the test plan. 7. For step 6 of the test plan, select 'Transaction history for CASH' from the menu on the left. 8. Scroll down to the bottom of the page - you should see a heading with "Cashup history". Then the rest of the test plan. Hope this helps! Created attachment 145925 [details] [review] Bug 32409: Fix cashup searching with non latin-1 chars This patch fixes a problem with the way queries are passed to the API so cashups are searchable with non-laint1 chars. To test: 1. Have two superlibrarian users, one with non-latin1 chars on the name (e.g. خمسة) 2. Setup a debit type that can be sold. 3. Use the POS module to have some activity, using both your regular user and the other one. 4. Go to the register you used, and choose 'Transaction history' 5. Perform a couple cashups with each user ('Record cashup'). 6. Look at the 'Cashup history' table => SUCCESS: You see cashups for both users 7. Use the 'Search' filter with latin chars => SUCCESS: Your user with only latin1 chars is displayed on the table 8. Repeat, using some non-latin1 char found on the other user => FAIL: Table is not refreshed or filtered! 9. Apply this patch 10. Reload the page 11. Repeat 8 => SUCCESS: Filtering works now! 12. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 23.05. Nice work everyone, thanks! Nice work, thanks everyone! Pushed to 22.11.x for the next release. Backported to 22.05.x for upcoming 22.05.10 applied to 21.11.x for 21.11.16 Not backported to 21.05.x |