Bug 36946

Summary: Can't process pending offline circulations
Product: Koha Reporter: Owen Leonard <oleonard>
Component: CirculationAssignee: Owen Leonard <oleonard>
Status: RESOLVED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: critical    
Priority: P5 - low CC: david, fridolin.somers, gmcharlt, kyle.m.hall, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Circulation function:
Attachments: Bug 36946: Fix cud- error when processing offline circulations
Bug 36946: Fix cud- error when processing offline circulations
Bug 36946: Fix cud- error when processing offline circulations

Description Owen Leonard 2024-05-23 13:04:02 UTC
Programming error - op 'cud-process' must not start with 'cud-'
Comment 1 Owen Leonard 2024-05-23 13:27:43 UTC
Created attachment 167109 [details] [review]
Bug 36946: Fix cud- error when processing offline circulations

This patch fixes a CSRF token error when processing offline
circulations. The form needed both the token parameter and to be sent as
POST.

To test, apply the patch and go to Circulation.

- Go to Upload offline circulation file (.koc)
- Upload a .koc file, add to offline circulation queue.
- View pending offline circulation actions.
- Check one or more transactions and click "Process" at the bottom of
  the page.
  - The process should complete without any JS errors, and the
    checkboxes should be replaced with the text "Success."
- Perform the same test with the "Delete" button.

Sponsored-By: Athens County Public Libraries
Comment 2 David Nind 2024-05-23 19:07:02 UTC
Created attachment 167126 [details] [review]
Bug 36946: Fix cud- error when processing offline circulations

This patch fixes a CSRF token error when processing offline
circulations. The form needed both the token parameter and to be sent as
POST.

To test, apply the patch and go to Circulation.

- Go to Upload offline circulation file (.koc)
- Upload a .koc file, add to offline circulation queue.
- View pending offline circulation actions.
- Check one or more transactions and click "Process" at the bottom of
  the page.
  - The process should complete without any JS errors, and the
    checkboxes should be replaced with the text "Success."
- Perform the same test with the "Delete" button.

Sponsored-By: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2024-05-23 19:08:53 UTC
Testing notes (using KTD):

1. Sample .koc file that will work with KTD (use a text editor and save as example.koc):

Version=1.0	Generator=kocQt4	GeneratorVersion=1.0
2023-01-16 09:41:57 262	issue	23529000035676	39999000011418
2023-01-17 09:41:57 13	issue	23529000035676	39999000000559
2023-01-18 09:41:57 146	issue	23529000035676	39999000006131
2023-01-19 09:41:57 191	issue	23529000035676	39999000008036
Comment 4 Marcel de Rooy 2024-05-24 06:48:08 UTC
Created attachment 167144 [details] [review]
Bug 36946: Fix cud- error when processing offline circulations

This patch fixes a CSRF token error when processing offline
circulations. The form needed both the token parameter and to be sent as
POST.

To test, apply the patch and go to Circulation.

- Go to Upload offline circulation file (.koc)
- Upload a .koc file, add to offline circulation queue.
- View pending offline circulation actions.
- Check one or more transactions and click "Process" at the bottom of
  the page.
  - The process should complete without any JS errors, and the
    checkboxes should be replaced with the text "Success."
- Perform the same test with the "Delete" button.

Sponsored-By: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Katrin Fischer 2024-05-24 13:40:34 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-05-30 08:21:03 UTC
Not for 23.11.x
Comment 7 David Nind 2024-07-17 04:51:49 UTC
No changes required to the manual.