Summary: | Batch patron modification from report results should be an option when borrowernumber is selected | ||
---|---|---|---|
Product: | Koha | Reporter: | hebah |
Component: | Reports | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | Needs documenting --- | QA Contact: | Pedro Amorim <pedro.amorim> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | laura, lucas, nick, oleonard, pedro.amorim, phil |
Version: | 24.05 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
Some libraries do not use card numbers for their patrons, but would still like to be able to batch modify patrons from reports. This will makes it so that adding the borrowernumber to a report will also allow to trigger batch patron modifications.
|
Version(s) released in: |
24.11.00
|
Circulation function: | |||
Bug Depends on: | 37197 | ||
Bug Blocks: | |||
Attachments: |
Bug 37188: Allow batch modification of borrowers from reports with cardnumber or borrowernumber
Bug 37188: Allow batch modification of borrowers from reports with cardnumber or borrowernumber Bug 37188: Allow batch modification of borrowers from reports with cardnumber or borrowernumber |
Description
hebah
2024-06-25 21:08:57 UTC
Are you *sure* that's a change from 23.11? Bug 29181 made the decision to show patron card creator when you select borrowernumber, and to show batch patron modification when you select cardnumber, and thus to only show both when you select borrowernumber, cardnumber, and that bug says it landed in 23.11 so it should be a change from 23.05 to 23.11. Certainly a regression in 24.05 that batch patron modification is broken since bug 34478 broke sending things to it by changing it from a POST which it accepts to a GET which it does not, though. Filed bug 37197 for that Bug 29181 comment 2 in the commit message said "The logic of the dropdown menu has been modified in order to ensure that duplicate patron modification options aren't shown in the menu when a report return both borrowernumber and cardnumber" but I don't see why that would occur. Batch patron modification can take either borrowernumber or cardnumber, so we should show it IF show_cardnumber_ops || show_borrowernumber_ops while patron card creator can only take borrowernumber so we should only show it IF show_borrowernumber_ops, and then if you select cardnumber you get batch patron modification only, if you select borrowernumber you get both, if you select both you get both. Oh, not quite so simple, since we have to know which sort of data we are sending to batch mod, and have a way to send it the thing we have from a particular report. Still, if ( (borrowernumber and cardnumber) or (borrowernumber and !cardnumber)) batchmod_borrowernumber elseif (cardnumber) batchmod_cardnumber endif if (cardnumber) cardcreator_cardnumber isn't *that* messy. *** Bug 37479 has been marked as a duplicate of this bug. *** Created attachment 169612 [details] [review] Bug 37188: Allow batch modification of borrowers from reports with cardnumber or borrowernumber Some libraries do not use cardnumbers for their patrons, but would still like to be able to batch modify patrons from reports. Borrowernumber is going to be authoritative - every borrower will have one - so if this column is included in the results we should offer batch modification. If we have cardnumber, we can use that. If we have both, we should use borrowernumber To test: 1 - Write a report like: SELECT cardnumber FROM borrowers ORDER BY rand() LIMIT 35 2 - Run report 3 - Click "Batch operations.." -> "Batch patron modification" 4 - Confirm it works 5 - Edit report: SELECT borrowernumber FROM borrowers ORDER BY rand() LIMIT 35 6 - Run report 7 - No option for batch modifying patrons 8 - Apply patch 9 - Run report 10 - The option for batch modificatoin now shows 11 - Confirm both batch operation types work from report 12 - Edit report: SELECT cardnumber,borrowernumber FROM borrowers ORDER BY rand() LIMIT 35 13 - Run report 14 - Confirm both batch operations work Created attachment 169726 [details] [review] Bug 37188: Allow batch modification of borrowers from reports with cardnumber or borrowernumber Some libraries do not use cardnumbers for their patrons, but would still like to be able to batch modify patrons from reports. Borrowernumber is going to be authoritative - every borrower will have one - so if this column is included in the results we should offer batch modification. If we have cardnumber, we can use that. If we have both, we should use borrowernumber To test: 1 - Write a report like: SELECT cardnumber FROM borrowers ORDER BY rand() LIMIT 35 2 - Run report 3 - Click "Batch operations.." -> "Batch patron modification" 4 - Confirm it works 5 - Edit report: SELECT borrowernumber FROM borrowers ORDER BY rand() LIMIT 35 6 - Run report 7 - No option for batch modifying patrons 8 - Apply patch 9 - Run report 10 - The option for batch modificatoin now shows 11 - Confirm both batch operation types work from report 12 - Edit report: SELECT cardnumber,borrowernumber FROM borrowers ORDER BY rand() LIMIT 35 13 - Run report 14 - Confirm both batch operations work Signed-off-by: Laura ONeil <laura@bywatersolutions.com> Created attachment 169814 [details] [review] Bug 37188: Allow batch modification of borrowers from reports with cardnumber or borrowernumber Some libraries do not use cardnumbers for their patrons, but would still like to be able to batch modify patrons from reports. Borrowernumber is going to be authoritative - every borrower will have one - so if this column is included in the results we should offer batch modification. If we have cardnumber, we can use that. If we have both, we should use borrowernumber To test: 1 - Write a report like: SELECT cardnumber FROM borrowers ORDER BY rand() LIMIT 35 2 - Run report 3 - Click "Batch operations.." -> "Batch patron modification" 4 - Confirm it works 5 - Edit report: SELECT borrowernumber FROM borrowers ORDER BY rand() LIMIT 35 6 - Run report 7 - No option for batch modifying patrons 8 - Apply patch 9 - Run report 10 - The option for batch modificatoin now shows 11 - Confirm both batch operation types work from report 12 - Edit report: SELECT cardnumber,borrowernumber FROM borrowers ORDER BY rand() LIMIT 35 13 - Run report 14 - Confirm both batch operations work Signed-off-by: Laura ONeil <laura@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> I am not sure if this is a regression really - I believe it was only cardnumber from the beginning when this feature was implemented. Pushed for 24.11! Well done everyone, thank you! Enhancement will not be backported to 24.05.x |