[Bug 37913] New: Remove more unreachable code in aqcontract.tt
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Bug ID: 37913 Summary: Remove more unreachable code in aqcontract.tt Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P3 Component: Acquisitions Assignee: phil@chetcolibrary.org Reporter: phil@chetcolibrary.org QA Contact: testopia@bugs.koha-community.org Blocks: 37728 Bug 37823 removes one set of unreachable code from aqcontract.tt, a block that tried to tell you that you had created a new contract rather than just showing you the new contract, but there is another: When you delete a contract, what actually happens is that you are shown the details page for the vendor, which lists the contracts for that vendor at the bottom, thus showing you that the contract has been deleted, but the template has a block which thinks it is going to tell you "<h1>Contract deleted</h1>" and then have you click an OK button to POST a form with no op param starting with cud-, which now fails the CSRF protection. Luckily, it's unreachable (and has been since aqcontract.pl first landed, it has always redirected after deleting, and has never shown that block), but having it there still fails a test once bug 37728 lands and lets the test see it. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37728 [Bug 37728] More "op" are missing in POSTed forms -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 --- Comment #1 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 171430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171430&action=edit Bug 37913: Remove more unreachable code in aqcontract.tt When you successfully delete an acquisitions contract, you are redirected to the page with the vendor details, which shows contracts for that vendor, which shows you that the contract you deleted was deleted. The aqcontract.tt template has a block in [% IF ( delete_confirmed ) %] (which is never set) that thinks it will show you a '<h1>Contract deleted</h1>' and make you click an OK button. That block has never been shown, but the button is in a form which POSTs without an 'op' param, which is now forbidden by the CSRF code, and will be caught by a test once bug 37728 updates the test. There's nothing visible to test, so the test plan just makes sure nothing blows up and you can still delete a contract. 1. Nothing will change, so start with the patch applied 2. Acquistions - click the Search button to search for vendors 3. New -> Contract 4. Give it a name, a start date, and an end date, and Save 5. In the list of contracts for My Vendor, click the Delete button for the contract you created 6. In the confirmation page asking if you wanted to delete, click 'Yes, delete contract' 7. Note that you are at acqui/supplier.pl?booksellerid=1, the details page for the vendor, and your contract isn't listed at the bottom of the page, and especially that you weren't shown a page that just said "Contract deleted." Sponsored-by: Chetco Community Public Library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Sukhmandeep <sukhmandeep.benipal@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171430|0 |1 is obsolete| | --- Comment #2 from Sukhmandeep <sukhmandeep.benipal@inLibro.com> --- Created attachment 171456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171456&action=edit Bug 37913: Remove more unreachable code in aqcontract.tt When you successfully delete an acquisitions contract, you are redirected to the page with the vendor details, which shows contracts for that vendor, which shows you that the contract you deleted was deleted. The aqcontract.tt template has a block in [% IF ( delete_confirmed ) %] (which is never set) that thinks it will show you a '<h1>Contract deleted</h1>' and make you click an OK button. That block has never been shown, but the button is in a form which POSTs without an 'op' param, which is now forbidden by the CSRF code, and will be caught by a test once bug 37728 updates the test. There's nothing visible to test, so the test plan just makes sure nothing blows up and you can still delete a contract. 1. Nothing will change, so start with the patch applied 2. Acquistions - click the Search button to search for vendors 3. New -> Contract 4. Give it a name, a start date, and an end date, and Save 5. In the list of contracts for My Vendor, click the Delete button for the contract you created 6. In the confirmation page asking if you wanted to delete, click 'Yes, delete contract' 7. Note that you are at acqui/supplier.pl?booksellerid=1, the details page for the vendor, and your contract isn't listed at the bottom of the page, and especially that you weren't shown a page that just said "Contract deleted." Sponsored-by: Chetco Community Public Library Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Sukhmandeep <sukhmandeep.benipal@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sukhmandeep.benipal@inLibro | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Paul Derscheid <paul.derscheid@lmscloud.de> 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=37913 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171456|0 |1 is obsolete| | --- Comment #3 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 171471 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171471&action=edit Bug 37913: Remove more unreachable code in aqcontract.tt When you successfully delete an acquisitions contract, you are redirected to the page with the vendor details, which shows contracts for that vendor, which shows you that the contract you deleted was deleted. The aqcontract.tt template has a block in [% IF ( delete_confirmed ) %] (which is never set) that thinks it will show you a '<h1>Contract deleted</h1>' and make you click an OK button. That block has never been shown, but the button is in a form which POSTs without an 'op' param, which is now forbidden by the CSRF code, and will be caught by a test once bug 37728 updates the test. There's nothing visible to test, so the test plan just makes sure nothing blows up and you can still delete a contract. 1. Nothing will change, so start with the patch applied 2. Acquistions - click the Search button to search for vendors 3. New -> Contract 4. Give it a name, a start date, and an end date, and Save 5. In the list of contracts for My Vendor, click the Delete button for the contract you created 6. In the confirmation page asking if you wanted to delete, click 'Yes, delete contract' 7. Note that you are at acqui/supplier.pl?booksellerid=1, the details page for the vendor, and your contract isn't listed at the bottom of the page, and especially that you weren't shown a page that just said "Contract deleted." Sponsored-by: Chetco Community Public Library Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de --- Comment #4 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Looks good, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |paul.derscheid@lmscloud.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! 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=37913 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.06 released in| | --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Needs documenting --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- I prefer not to backport to 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37913 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #8 from Phil Ringnalda <phil@chetcolibrary.org> --- Nothing to document, just removes never-used code. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org