Bugzilla – Attachment 175851 Details for
Bug 38766
Opening, closing, or deleting and invoice from the Action drop-down can cause internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38766: Use uri filter for all parameters in referer link
Bug-38766-Use-uri-filter-for-all-parameters-in-ref.patch (text/plain), 8.14 KB, created by
Emily Lamancusa (emlam)
on 2024-12-20 17:54:22 UTC
(
hide
)
Description:
Bug 38766: Use uri filter for all parameters in referer link
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-12-20 17:54:22 UTC
Size:
8.14 KB
patch
obsolete
>From 15d33ed4dfcd36657b25bd1424c596f584a15933 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Fri, 20 Dec 2024 12:43:14 -0500 >Subject: [PATCH] Bug 38766: Use uri filter for all parameters in referer link > >Also fixes the confirmation message for deleting. > >To test: >1. Go to Acquisitions and create some invoices > i. Search for a vendor (can submit a blank search box) > ii. Click on vendor name > iii. Click "Receive shipments" button > iv. In the "Receive a new shipment" section, enter any value in the > "Vendor invoice" field and click "Next" > v. Click the "My Vendor" breadcrumb and repeat iii-iv a few times >2. Go to Acquisitions > Invoices >3. Specify search filters for shipment to/from dates (that include the > invoices you entered) and search for invoices >4. Try opening, closing, and deleting individual invoices using the > Action menu >--> Internal server error! "The given date <date> does not match the > date format (iso)". >--> Also, note that there is no confirmation dialog when deleting >5. Apply patch >6. Repeat steps 2-4 >--> Confirm that invoices can be opened and closed using the drop-down > menu with no issue >--> Confirm that both open and closed invoices can be deleted with no > issue, and that a confirmation message displays before deleting > >Note for QA: search for $KohaDates within invoices.tt, and confirm that >the $KohaDates filter is now only used for display, never for Internal >data storage/flow >--- > .../intranet-tmpl/prog/en/modules/acqui/invoices.tt | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >index aa8f4d8fab..716f60b00a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >@@ -103,16 +103,16 @@ > <li><a class="dropdown-item" href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid | uri %]"><i class="fa fa-search"></i> Details</a></li> > [% IF invoice.closedate %] > [% IF CAN_user_acquisition_reopen_closed_invoices %] >- <li><a class="dropdown-item submit-form-link" data-action="invoice.pl" data-op="cud-reopen" data-invoiceid="[% invoice.invoiceid | uri %]" data-referer="/cgi-bin/koha/acqui/invoices.pl?op=do_search&invoicenumber=[% invoicenumber | html %]&supplier=[% booksellerid | html %]&shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]&shipmentdateto=[% shipmentdateto | $KohaDates %]&billingdatefrom=[% billingdatefrom | $KohaDates %]&billingdateto=[% billingdateto | $KohaDates %]&isbneanissn=[% isbneanissn | html %]&title=[% title | html %]&author=[% author | html %]&publisher=[% publisher | html %]&publicationyear=[% publicationyear | html %]&branch=[% branch | html %]" data-method="post"><i class="fa-solid fa-rotate"></i> Reopen</a></li> >+ <li><a class="dropdown-item submit-form-link" data-action="invoice.pl" data-op="cud-reopen" data-invoiceid="[% invoice.invoiceid | uri %]" data-referer="/cgi-bin/koha/acqui/invoices.pl?op=do_search&invoicenumber=[% invoicenumber | uri %]&supplier=[% booksellerid | uri %]&shipmentdatefrom=[% shipmentdatefrom | uri %]&shipmentdateto=[% shipmentdateto | uri %]&billingdatefrom=[% billingdatefrom | uri %]&billingdateto=[% billingdateto | uri %]&isbneanissn=[% isbneanissn | uri %]&title=[% title | uri %]&author=[% author | uri %]&publisher=[% publisher | uri %]&publicationyear=[% publicationyear | uri %]&branch=[% branch | uri %]" data-method="post"><i class="fa-solid fa-rotate"></i> Reopen</a></li> > [% END %] > [% ELSE %] > [% IF CAN_user_acquisition_edit_invoices %] >- <li><a class="dropdown-item submit-form-link" data-action="invoice.pl" data-op="cud-close" data-invoiceid="[% invoice.invoiceid | html %]" data-referer="/cgi-bin/koha/acqui/invoices.pl?op=do_search&invoicenumber=[% invoicenumber | html %]&supplier=[% booksellerid | html %]&shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]&shipmentdateto=[% shipmentdateto | $KohaDates %]&billingdatefrom=[% billingdatefrom | $KohaDates %]&billingdateto=[% billingdateto | $KohaDates %]&isbneanissn=[% isbneanissn | html %]&title=[% title | html %]&author=[% author | html %]&publisher=[% publisher | html %]&publicationyear=[% publicationyear | html %]&branch=[% branch | html %]" data-method="post"><i class="fa fa-times-circle"></i> Close</a></li> >+ <li><a class="dropdown-item submit-form-link" data-action="invoice.pl" data-op="cud-close" data-invoiceid="[% invoice.invoiceid | html %]" data-referer="/cgi-bin/koha/acqui/invoices.pl?op=do_search&invoicenumber=[% invoicenumber | uri %]&supplier=[% booksellerid | uri %]&shipmentdatefrom=[% shipmentdatefrom | uri %]&shipmentdateto=[% shipmentdateto | uri %]&billingdatefrom=[% billingdatefrom | uri %]&billingdateto=[% billingdateto | uri %]&isbneanissn=[% isbneanissn | uri %]&title=[% title | uri %]&author=[% author | uri %]&publisher=[% publisher | uri %]&publicationyear=[% publicationyear | uri %]&branch=[% branch | uri %]" data-method="post"><i class="fa fa-times-circle"></i> Close</a></li> > [% END %] > [% END # /IF invoice.closedate %] > [% UNLESS invoice.receivedbiblios || invoice.receiveditems %] > [% IF CAN_user_acquisition_delete_invoices %] >- <li><a class="dropdown-item submit-form-link" data-action="invoice.pl" data-op="cud-delete" data-invoiceid="[% invoice.invoiceid | html %]" data-referer="/cgi-bin/koha/acqui/invoices.pl?op=do_search&invoicenumber=[% invoicenumber | html %]&supplier=[% booksellerid | html %]&shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]&shipmentdateto=[% shipmentdateto | $KohaDates %]&billingdatefrom=[% billingdatefrom | $KohaDates %]&billingdateto=[% billingdateto | $KohaDates %]&isbneanissn=[% isbneanissn | uri %]&title=[% title | html %]%26author=[% author | html %]&publisher=[% publisher | html %]&publicationyear=[% publicationyear | html %]&branch=[% branch | html %]" data-method="post"><i class="fa fa-trash-can"></i> Delete</a></li> >+ <li><a class="dropdown-item submit-form-link" data-action="invoice.pl" data-op="cud-delete" data-confirmation-msg="Are you sure you want to delete this invoice?" data-invoiceid="[% invoice.invoiceid | html %]" data-referer="/cgi-bin/koha/acqui/invoices.pl?op=do_search&invoicenumber=[% invoicenumber | uri %]&supplier=[% booksellerid | uri %]&shipmentdatefrom=[% shipmentdatefrom | uri %]&shipmentdateto=[% shipmentdateto | uri %]&billingdatefrom=[% billingdatefrom | uri %]&billingdateto=[% billingdateto | uri %]&isbneanissn=[% isbneanissn | uri %]&title=[% title | uri %]&author=[% author | uri %]&publisher=[% publisher | uri %]&publicationyear=[% publicationyear | uri %]&branch=[% branch | uri %]" data-method="post"><i class="fa fa-trash-can"></i> Delete</a></li> > [% END %] > [% END %] > </ul> >@@ -439,9 +439,6 @@ > }); > }); > >- $(".delete_invoice").click(function(){ >- return confirmDelete(_("Are you sure you want to delete this invoice?")); >- }); > var resultst = $("table.result").dataTable($.extend(true, {}, dataTablesDefaults, { > "paging": false, > "columnDefs": [ >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38766
:
175851
|
175854