Summary: | Remove more unreachable code in aqcontract.tt | ||
---|---|---|---|
Product: | Koha | Reporter: | Phil Ringnalda <phil> |
Component: | Acquisitions | Assignee: | Phil Ringnalda <phil> |
Status: | Pushed to main --- | QA Contact: | Paul Derscheid <paul.derscheid> |
Severity: | normal | ||
Priority: | P3 | CC: | paul.derscheid, sukhmandeep.benipal |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 37728 | ||
Attachments: |
Bug 37913: Remove more unreachable code in aqcontract.tt
Bug 37913: Remove more unreachable code in aqcontract.tt Bug 37913: Remove more unreachable code in aqcontract.tt |
Description
Phil Ringnalda
2024-09-12 22:05:07 UTC
Created attachment 171430 [details] [review] 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 Created attachment 171456 [details] [review] 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> Created attachment 171471 [details] [review] 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> Looks good, thanks! Pushed for 24.11! Well done everyone, thank you! |