Bug 40067

Summary: "Receive shipments" should not open in a new tab/window
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: AcquisitionsAssignee: Matt Blenkinsop <matt.blenkinsop>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: matt.blenkinsop
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:
Bug Depends on: 38010    
Bug Blocks: 38899    
Attachments: Bug 40067: Prevent receive shipments opening in a new tab
Bug 40067: Simplify code
Bug 40067: Prevent receive shipments opening in a new tab
Bug 40067: Simplify code
Bug 40067: Add a cypress test
Bug 40067: Add a cypress test
Bug 40067: Prevent receive shipments opening in a new tab
Bug 40067: Simplify code
Bug 40067: Add a cypress test
Bug 40067: Improve waits and intercepts

Description Jonathan Druart 2025-06-04 07:21:03 UTC
On the vendor view: http://localhost:8081/cgi-bin/koha/acquisition/vendors/1

click "Receive shipments" in the toolbar

http://localhost:8081//cgi-bin/koha/acqui/parcels.pl?booksellerid=1
is opened in a separate tab/window
Comment 1 Matt Blenkinsop 2025-06-04 09:27:01 UTC
Created attachment 182934 [details] [review]
Bug 40067: Prevent receive shipments opening in a new tab

Test plan:
1) Navigate to a vendor record
2) Click the Receive shipments button
3) It will open in a new tab
4) Apply patch - yarn js:build
5) Hard refresh the browser
6) Repeat steps 1 - 2
7) The page will open in the same tab
Comment 2 Jonathan Druart 2025-06-04 12:48:42 UTC
Created attachment 182949 [details] [review]
Bug 40067: Simplify code
Comment 3 Jonathan Druart 2025-06-04 12:49:21 UTC
Created attachment 182950 [details] [review]
Bug 40067: Prevent receive shipments opening in a new tab

Test plan:
1) Navigate to a vendor record
2) Click the Receive shipments button
3) It will open in a new tab
4) Apply patch - yarn js:build
5) Hard refresh the browser
6) Repeat steps 1 - 2
7) The page will open in the same tab

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2025-06-04 12:49:23 UTC
Created attachment 182951 [details] [review]
Bug 40067: Simplify code
Comment 5 Jonathan Druart 2025-06-04 12:49:46 UTC
I think we need a test here.
Comment 6 Matt Blenkinsop 2025-06-05 09:11:40 UTC
Created attachment 182972 [details] [review]
Bug 40067: Add a cypress test
Comment 7 Jonathan Druart 2025-06-05 09:38:43 UTC
(In reply to Matt Blenkinsop from comment #6)
> Created attachment 182972 [details] [review] [review]
> Bug 40067: Add a cypress test

Have a look at bug 40051, we should not use cy.wait(delay).
Comment 8 Matt Blenkinsop 2025-06-05 09:42:01 UTC
Created attachment 182981 [details] [review]
Bug 40067: Add a cypress test
Comment 9 Jonathan Druart 2025-06-05 14:30:12 UTC
Created attachment 183000 [details] [review]
Bug 40067: Prevent receive shipments opening in a new tab

Test plan:
1) Navigate to a vendor record
2) Click the Receive shipments button
3) It will open in a new tab
4) Apply patch - yarn js:build
5) Hard refresh the browser
6) Repeat steps 1 - 2
7) The page will open in the same tab

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2025-06-05 14:30:15 UTC
Created attachment 183001 [details] [review]
Bug 40067: Simplify code

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2025-06-05 14:30:18 UTC
Created attachment 183002 [details] [review]
Bug 40067: Add a cypress test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2025-06-05 14:30:21 UTC
Created attachment 183003 [details] [review]
Bug 40067: Improve waits and intercepts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Lucas Gass (lukeg) 2025-06-06 15:46:47 UTC
Nice work everyone!

Pushed to main for 25.11