Bug 36173 - Cancelling order confirmation view does not show basket's info
Summary: Cancelling order confirmation view does not show basket's info
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-27 13:00 UTC by Jonathan Druart
Modified: 2024-05-28 17:21 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the breadcrumb links on the confirmation page when cancelling an order (from the receiving screen).
Version(s) released in:
24.05.00,23.11.06


Attachments
Bug 36173: Display basket info when cancelling an order (4.43 KB, patch)
2024-02-27 13:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36173: Display basket info when cancelling an order (4.47 KB, patch)
2024-03-12 05:55 UTC, David Nind
Details | Diff | Splinter Review
Bug 36173: Display basket info when cancelling an order (4.66 KB, patch)
2024-04-02 11:56 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36173: (follow-up) Tidy (1.52 KB, patch)
2024-04-02 11:56 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-02-27 13:00:01 UTC

    
Comment 1 Jonathan Druart 2024-02-27 13:02:06 UTC
Created attachment 162501 [details] [review]
Bug 36173: Display basket info when cancelling an order

The basketno is missing from the 2 links in acqui/parcel.tt

Better to retrieve the basketno from the order in the controller.

Test plan:
Create an order, receive it
On the parcel view notice that the "Cancel order" link leads to a
confirmation page that does not contain the info of the basket.
It's fixed with this patch applied.
Comment 2 Jonathan Druart 2024-02-27 13:02:31 UTC
If this patch does not apply, wait for bug 34478 to be pushed.
Comment 3 David Nind 2024-03-12 05:55:52 UTC
Created attachment 163086 [details] [review]
Bug 36173: Display basket info when cancelling an order

The basketno is missing from the 2 links in acqui/parcel.tt

Better to retrieve the basketno from the order in the controller.

Test plan:
Create an order, receive it
On the parcel view notice that the "Cancel order" link leads to a
confirmation page that does not contain the info of the basket.
It's fixed with this patch applied.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2024-03-12 05:56:45 UTC
Testing notes (using KTD):

1. Breadcrumb links when you cancel an order are corrected with the patch:

   . Before - no text or link to My Vendor and no link for Basket number:
     Acquisitions >  > Basket () for > Cancel order 

   . After - now correctly has text and link to the vendor and for the Basket:
     Acquisitions > My Vendor > Basket TEST1 (2) for My Vendor > Cancel order

Other notes
===========

Is there another issue here as well, with actually receiving an order? When I go to receive an order (before the patch is applied), I get an error - not sure whether this is something to do with my KTD setup, or something else:

1. Added one item to a basket
2. Closed the basket
4. Went to receive order for an order
5. Update quantity to receive - 1
6. Error in pop up window: "Order 1: An error occurred while saving"
7. Web developer tools error:

XHRPOST http://127.0.0.1:8081/cgi-bin/koha/acqui/finishreceive.pl
[HTTP/1.1 403 Forbidden 103ms]
	
POST http://127.0.0.1:8081/cgi-bin/koha/acqui/finishreceive.pl
Status 403 Forbidden
Version HTTP/1.1
Transferred 29.46 kB (29 kB size)
Referrer Policy strict-origin-when-cross-origin
Request Priority Highest
DNS Resolution System

Response Headers:
    Cache-Control no-cache
    Connection Keep-Alive
    Content-Length 28999
    Content-Script-Type text/javascript
    Content-Style-Type 	text/css
    Content-Type text/html; charset=UTF-8
    Date Tue, 12 Mar 2024 04:55:06 GMT
    Keep-Alive timeout=5, max=100
    Pragma no-cache
    Server Apache/2.4.56 (Debian)
    Set-Cookie CGISESSID=0edfe61661acb72d2e9f2c872340a966; path=/; HttpOnly; SameSite=Lax
    Vary User-Agent
    X-Frame-Options SAMEORIGIN
 
Request Headers:
    Accept */*
    Accept-Encoding gzip, deflate, br
    Accept-Language en-US,en;q=0.5
    Connection keep-alive
    Content-Length 260
    Content-Type application/x-www-form-urlencoded; charset=UTF-8
    Cookie CGISESSID=0edfe61661acb72d2e9f2c872340a966; searchToOrder=1/1
    Host 127.0.0.1:8081
    Origin http://127.0.0.1:8081
    Referer http://127.0.0.1:8081/cgi-bin/koha/acqui/orderreceive.pl?multiple_orders=1&invoiceid=1
    Sec-Fetch-Dest empty
    Sec-Fetch-Mode cors
    Sec-Fetch-Site same-origin
    User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0
    X-Requested-With  XMLHttpRequest
Comment 5 Nick Clemens (kidclamp) 2024-04-02 11:56:55 UTC
Created attachment 164262 [details] [review]
Bug 36173: Display basket info when cancelling an order

The basketno is missing from the 2 links in acqui/parcel.tt

Better to retrieve the basketno from the order in the controller.

Test plan:
Create an order, receive it
On the parcel view notice that the "Cancel order" link leads to a
confirmation page that does not contain the info of the basket.
It's fixed with this patch applied.

Note: Don't fully receive, but 'Receive shipment' from vendor, choose an invoice, and cancel the order from the list to be received

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Nick Clemens (kidclamp) 2024-04-02 11:56:57 UTC
Created attachment 164263 [details] [review]
Bug 36173: (follow-up) Tidy
Comment 7 Nick Clemens (kidclamp) 2024-04-02 11:57:53 UTC
(In reply to David Nind from comment #4)
> Testing notes (using KTD):

> Other notes
> ===========
> 
> Is there another issue here as well, with actually receiving an order? When
> I go to receive an order (before the patch is applied), I get an error - not
> sure whether this is something to do with my KTD setup, or something else:
> 

I didn't see this, but possibly CSRF issues that have been addressed
Comment 8 Katrin Fischer 2024-04-05 09:52:47 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-05-23 11:44:35 UTC
Pushed to 23.11.x for 23.11.06
Comment 10 Lucas Gass 2024-05-28 17:21:24 UTC
Doesn't apply cleanly to 23.05.x, no backport.