[Bug 36418] New: Can't properly renew/checkin from issues-table
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Bug ID: 36418 Summary: Can't properly renew/checkin from issues-table Change sponsored?: --- Product: Koha Version: 23.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To recreate: 1. Add some checkouts and load the issues-table 2. Select 'Check in' checkbox for that item and click "Check in selected items" 3. The row becomes read and reads "Unable to check in" 4. Reload the page, the item has actually checked in 5. Try the 'Renew' checkbox and click "Renew selected items" 6. It just spins and spins. 7. Reload the page, the item has actually renewed. Seems related to Bug 36351? svc/renew and svc/checkin stopped assuming the response is JSON. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|23.05 |master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36351 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36351 [Bug 36351] CSRF Adjustments for Cataloguing editor -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 163837 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163837&action=edit Bug 36418: Explicitly set response to json To test: 1. Add some checkouts and load the issues-table 2. Select 'Check in' checkbox for that item and click "Check in selected items" 3. The row becomes read and reads "Unable to check in" 4. Reload the page, the item has actually checked in 5. Try the 'Renew' checkbox and click "Renew selected items" 6. It just spins and spins. 7. Reload the page, the item has actually renewed. 8. APPLY PATCH and restart_all 9. Try the steps again and this time everything should work properly. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Is this the correct fix and if so, do all the svc/* files need it? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36060 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36060 [Bug 36060] If issues table includes overdues Renew selected items button is disabled -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 163885 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163885&action=edit Bug 36418: Set header response content type to application/json - svc We need to set the content type to application/json for the svc scripts returning json -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Can't properly |Set response's content-type |renew/checkin from |to application/json when |issues-table |needed - svc scripts --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Lucas Gass from comment #2)
Is this the correct fix and if so, do all the svc/* files need it?
Yes, I have also found other scripts that need the change. Thanks for catching that! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | Severity|normal |major -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163837|0 |1 is obsolete| | --- Comment #5 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 163922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163922&action=edit Bug 36418: Explicitly set response to json To test: 1. Add some checkouts and load the issues-table 2. Select 'Check in' checkbox for that item and click "Check in selected items" 3. The row becomes read and reads "Unable to check in" 4. Reload the page, the item has actually checked in 5. Try the 'Renew' checkbox and click "Renew selected items" 6. It just spins and spins. 7. Reload the page, the item has actually renewed. 8. APPLY PATCH and restart_all 9. Try the steps again and this time everything should work properly. Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163885|0 |1 is obsolete| | --- Comment #6 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 163923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163923&action=edit Bug 36418: Set header response content type to application/json - svc We need to set the content type to application/json for the svc scripts returning json Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
Is this the correct fix and if so, do all the svc/* files need it? Yes
Maybe these two then? svc/recall svc/mana/increment What about the OPAC? opac/svc/club/enroll opac/svc/club/cancel_enrollment -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Victor Grousset/tuxayo from comment #7)
Is this the correct fix and if so, do all the svc/* files need it? Yes
Maybe these two then? svc/recall
I missed this one it seems.
svc/mana/increment
I don't know, it's not obvious what is the return. Please investigate (test) and you will see if it returns JSON or something else.
What about the OPAC? opac/svc/club/enroll opac/svc/club/cancel_enrollment
If they output JSON, yes they should. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
svc/recall
I missed this one it seems.
This one indeed outputs JSON
svc/mana/increment
I don't know, it's not obvious what is the return. Please investigate (test) and you will see if it returns JSON or something else.
It seems the return is nothing. From the code, and from testing.
opac/svc/club/enroll opac/svc/club/cancel_enrollment
If they output JSON, yes they should.
enroll: after testing, yes it does cancel_enrollment: last two lines
print $cgi->header( -type => 'text/plain', -charset => 'UTF-8' ); print to_json( { success => $enrollment ? 1 : 0 } );
lol, yes also A `type => 'text/plain'` just above a `print to_json` So work needed on 3 of the 4 suspected files. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|lucas@bywatersolutions.com |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
A `type => 'text/plain'` just above a `print to_json`
That's not the only case >_< randomly opened serials/subscription-frequency.pl and there is:
print $input->header(-type => 'text/plain', -charset => 'UTF-8'); print to_json( $frequencyrecord );
Is that still relevant for this ticket? Leaning towards no. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #11 from Jonathan Druart <jonathan.druart@gmail.com> --- Can you provide a follow-up maybe? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@gmail.com |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 164066 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164066&action=edit Bug 36418: Catch more cases where header respose should be application/json -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163922|0 |1 is obsolete| | --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 164094 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164094&action=edit Bug 36418: Explicitly set response to json To test: 1. Add some checkouts and load the issues-table 2. Select 'Check in' checkbox for that item and click "Check in selected items" 3. The row becomes read and reads "Unable to check in" 4. Reload the page, the item has actually checked in 5. Try the 'Renew' checkbox and click "Renew selected items" 6. It just spins and spins. 7. Reload the page, the item has actually renewed. 8. APPLY PATCH and restart_all 9. Try the steps again and this time everything should work properly. 10. tests these URLs http://localhost:8081/cgi-bin/koha/svc/recall http://localhost:8080/cgi-bin/koha/svc/club/enroll http://localhost:8081/cgi-bin/koha/svc/mana/increment : empty response Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163923|0 |1 is obsolete| | --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 164095 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164095&action=edit Bug 36418: Set header response content type to application/json - svc We need to set the content type to application/json for the svc scripts returning json Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 164096 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164096&action=edit Bug 36418: Catch more cases where header response should be application/json Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #16 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 164097 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164097&action=edit Bug 36418: opac/svc/club: switch content-type to application/json -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164066|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #17 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Tested & SOed Lucas' follow-up, and added another follow-up for the OPAC cases. Amended test plan to add the URLs used to test Lucas' follow-up and mine partially. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164094|0 |1 is obsolete| | Attachment #164095|0 |1 is obsolete| | Attachment #164096|0 |1 is obsolete| | Attachment #164097|0 |1 is obsolete| | --- Comment #18 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 164102 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164102&action=edit Bug 36418: Explicitly set response to json To test: 1. Add some checkouts and load the issues-table 2. Select 'Check in' checkbox for that item and click "Check in selected items" 3. The row becomes read and reads "Unable to check in" 4. Reload the page, the item has actually checked in 5. Try the 'Renew' checkbox and click "Renew selected items" 6. It just spins and spins. 7. Reload the page, the item has actually renewed. 8. APPLY PATCH and restart_all 9. Try the steps again and this time everything should work properly. 10. tests these URLs http://localhost:8081/cgi-bin/koha/svc/recall http://localhost:8080/cgi-bin/koha/svc/club/enroll http://localhost:8081/cgi-bin/koha/svc/mana/increment : empty response Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #19 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 164103 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164103&action=edit Bug 36418: Set header response content type to application/json - svc We need to set the content type to application/json for the svc scripts returning json Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #20 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 164104 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164104&action=edit Bug 36418: Catch more cases where header response should be application/json Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #21 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 164105 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164105&action=edit Bug 36418: opac/svc/club: switch content-type to application/json Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36468 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Bug 36418 depends on bug 36351, which changed state. Bug 36351 Summary: CSRF Adjustments for Cataloguing editor https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36351 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36418 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED CC| |fridolin.somers@biblibre.co | |m Resolution|--- |FIXED --- Comment #23 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on bug 36351 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org