Bug 40067 - "Receive shipments" should not open in a new tab/window
Summary: "Receive shipments" should not open in a new tab/window
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Matt Blenkinsop
QA Contact: Testopia
URL:
Keywords:
Depends on: 38010
Blocks: 38899 40318 40430
  Show dependency treegraph
 
Reported: 2025-06-04 07:21 UTC by Jonathan Druart
Modified: 2025-07-28 16:42 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the "Receive shipments" action from a vendor page in acquisition - it now opens the receive shipment form in the same window, instead of opening in a new tab or window.
Version(s) released in:
25.11.00,25.05.01
Circulation function:


Attachments
Bug 40067: Prevent receive shipments opening in a new tab (1.25 KB, patch)
2025-06-04 09:27 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40067: Simplify code (1.39 KB, patch)
2025-06-04 12:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40067: Prevent receive shipments opening in a new tab (1.33 KB, patch)
2025-06-04 12:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40067: Simplify code (1.39 KB, patch)
2025-06-04 12:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40067: Add a cypress test (7.75 KB, patch)
2025-06-05 09:11 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40067: Add a cypress test (7.67 KB, patch)
2025-06-05 09:42 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40067: Prevent receive shipments opening in a new tab (1.40 KB, patch)
2025-06-05 14:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40067: Simplify code (1.47 KB, patch)
2025-06-05 14:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40067: Add a cypress test (7.75 KB, patch)
2025-06-05 14:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40067: Improve waits and intercepts (1.44 KB, patch)
2025-06-05 14:30 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 14 Paul Derscheid 2025-06-22 21:47:30 UTC
Nice work everyone!

Pushed to 25.05.x for 25.05.03
Comment 15 David Nind 2025-07-05 08:26:13 UTC
Noticed when writing the release note.

It also opens in a new tab/window when you click "Receive shipments" in the actions column from the list of vendors:
1. Acquisitions > Search vendors > Search
2. In the actions column, click "Receive shipments".
3. Note that the receive shipment from vendor [name] page opens in a new tab/window.
4. Repeat step 1
5. In the actions column, click "Edit".
6. Note that the edit action edit vendor page opens in the same tab/window (that is, it doesn't open in a new tab/window like the "Receive shipments" action).
Comment 16 Jonathan Druart 2025-07-07 13:21:18 UTC
(In reply to David Nind from comment #15)
> Noticed when writing the release note.
> 
> It also opens in a new tab/window when you click "Receive shipments" in the
> actions column from the list of vendors:
> 1. Acquisitions > Search vendors > Search
> 2. In the actions column, click "Receive shipments".
> 3. Note that the receive shipment from vendor [name] page opens in a new
> tab/window.
> 4. Repeat step 1
> 5. In the actions column, click "Edit".
> 6. Note that the edit action edit vendor page opens in the same tab/window
> (that is, it doesn't open in a new tab/window like the "Receive shipments"
> action).

Opened bug 40318.
Comment 17 Baptiste Wojtkowski (bwoj) 2025-07-09 13:37:30 UTC
Depends on Bug 38010, not backported to 24.11
Comment 18 Jonathan Druart 2025-07-17 09:23:45 UTC
The new test is failing, opening a new bug report.

bug 40430.
Comment 19 Caroline Cyr La Rose 2025-07-28 16:42:39 UTC
Nothing to change in the manual.