Bug 27142 - Patron batch update from report module - no patrons loaded into view
Summary: Patron batch update from report module - no patrons loaded into view
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
: 27194 (view as bug list)
Depends on: 24886 25942
Blocks:
  Show dependency treegraph
 
Reported: 2020-12-03 06:10 UTC by Stefan Norinder
Modified: 2020-12-11 15:00 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
This fixes an error when batch modifying patrons using the reports module. After running a report (such as SELECT * FROM borrowers LIMIT 50) and selecting batch modification an error was displayed: "Warning, the following cardnumbers were not found:", and you were not able to modify any patrons.
Version(s) released in:
21.05.00,20.11.01, 20.05.07


Attachments
Bug 27142: Don't interpolate batch_type variable (1.74 KB, patch)
2020-12-03 13:34 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27142: Don't interpolate batch_type variable (1.78 KB, patch)
2020-12-03 21:20 UTC, David Nind
Details | Diff | Splinter Review
Bug 27142: Don't interpolate batch_type variable (1.84 KB, patch)
2020-12-07 16:56 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Norinder 2020-12-03 06:10:41 UTC
Can't batch update patrons from reports module. 

Steps to reproduce: 

1. Navigate to reports module 
2. Create sql report with `select * from borrowers`
3. Save report 
4. Run report 
5. Click "Batch operation with 20 visible patrons" 
6. Click "Batch patron modification" 

Result: no patrons are loaded in the view. Koha shows message "Warning, the following cardnumbers were not found:" and presents all cardnumbers of patrons from the sql query. 

I verified that the same steps in Koha version 19.11 works fine.
Comment 1 Nick Clemens 2020-12-03 13:34:29 UTC
Created attachment 114146 [details] [review]
Bug 27142: Don't interpolate batch_type variable

To test:
1 - Create a report like:
    SELECT * FROM borrowers LIMIT 50
2 - Run the report
3 - Attempt batch modification - it fails showing every row as an unfound cardnumber
4 - Apply patch
5 - Repeat
6 - Success!
7 - Edit report to:
    SELECT * FROM biblio LIMIT 50
8 - Repeat test
9 - Ensure batch modification and deletion work
Comment 2 David Nind 2020-12-03 21:20:14 UTC
Created attachment 114167 [details] [review]
Bug 27142: Don't interpolate batch_type variable

To test:
1 - Create a report like:
    SELECT * FROM borrowers LIMIT 50
2 - Run the report
3 - Attempt batch modification - it fails showing every row as an unfound cardnumber
4 - Apply patch
5 - Repeat
6 - Success!
7 - Edit report to:
    SELECT * FROM biblio LIMIT 50
8 - Repeat test
9 - Ensure batch modification and deletion work

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Martin Renvoize 2020-12-07 16:56:49 UTC
Created attachment 114238 [details] [review]
Bug 27142: Don't interpolate batch_type variable

To test:
1 - Create a report like:
    SELECT * FROM borrowers LIMIT 50
2 - Run the report
3 - Attempt batch modification - it fails showing every row as an unfound cardnumber
4 - Apply patch
5 - Repeat
6 - Success!
7 - Edit report to:
    SELECT * FROM biblio LIMIT 50
8 - Repeat test
9 - Ensure batch modification and deletion work

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2020-12-07 16:57:08 UTC
Works as expected, no regressions found. Passing QA
Comment 5 Jonathan Druart 2020-12-09 10:53:27 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2020-12-10 10:28:28 UTC
Pushed to 20.11.x for 20.11.01
Comment 7 Andrew Fuerste-Henry 2020-12-10 21:22:21 UTC
Pushed to 20.05.x for 20.05.7
Comment 8 Jonathan Druart 2020-12-11 11:22:03 UTC
*** Bug 27194 has been marked as a duplicate of this bug. ***
Comment 9 Victor Grousset/tuxayo 2020-12-11 15:00:34 UTC
Missing dependencies for 19.11.x, can't backport.