Skip to content

LIMS-2461: Book incoming EU dewars via the shipping service - #1102

Open
ndg63276 wants to merge 1 commit into
masterfrom
improvement/LIMS-2461/allow-incoming-eu-shipments-to-use-shipping-service
Open

ndg63276 wants to merge 1 commit into
masterfrom
improvement/LIMS-2461/allow-incoming-eu-shipments-to-use-shipping-service

Conversation

@ndg63276

Copy link
Copy Markdown
Collaborator

JIRA ticket: LIMS-2461

Summary:

A second attempt at this, after #1077 (LIMS-2205). That code caused problems because we were sending an "external id" to the shipping service, but were using the dewar id in one direction and the shipping id in the other, which caused clashes. Since #1090, we no longer send an external id to the shipping service, so we should no longer have those problems.

Changes:

  • Add a feature flag to use the shipping service for NDE (non-domestic European) incoming shipments
  • Use the same email address list for domestic and international
  • If a shipment has only one dewar, and already has an incoming shipment request id, use the same id for outgoing
  • Change the message displayed and enable the button to request an AWB on the View Shipment page (if EU and feature flag enabled)
  • Limit shipments to 1 dewar if EU and using our courier (so that it always uses the same incoming and outgoing shipment request id)

To test:

  • Add to the config if not already there
$use_shipping_service = True;
$use_shipping_service_nde = True;
$use_shipping_service_incoming_shipments = True;
$shipping_service_app_url = "https://sample-shipping-test.diamond.ac.uk";
$shipping_service_api_user = "synchweb";
$shipping_service_api_password = <redacted>;
# new
$use_shipping_service_incoming_shipments_nde = True;
  • Go to an mx proposal, create a lab contact with an EU address

  • Go to /shipments/add, and start creating a shipment. Choose UDC for the scheduling option as it doesn't ask any more questions.

  • Select 2 dewars, choose the EU lab contact, then click "Use Facility Account", check a message appears saying you can only have 1 dewar, and the no of dewars box is now fixed at 1

  • Click "Add Shipment", you should be taken to the View Shipment page, check the message says you can now request your shipment, and the "Request DHL Air Waybill" button is active

  • Click "Request DHL Air Waybill", tick the box for the dewar, and click Proceed. Check you are taken to the (test) shipping service

  • Fill in your address, choosing the same EU country, and a valid postcode and EORI number. Click Next, then click Submit, and then Done.

  • You should be taken back to Synchweb, check the dewar status is 'awb requested'

  • In a new tab visit https://sample-shipping-test.diamond.ac.uk/shipment-requests/ and check your shipment appears at the top as "Pending" for the incoming shipment

  • ask Mark if he got an email asking to book the shipment, and if he can add a tracking number (2815193780 might work), the dewar status should update to "awb created", and the shipping service should describe it as "Booked"

  • Back in Synchweb, request the dewar to come home by pressing "Dispatch", and then "Proceed", and go through the shipping service again

  • Check the dewar status is back to "awb requested"

  • Look again at https://sample-shipping-test.diamond.ac.uk/shipment-requests, check your shipment now has Booked and Pending for incoming and outgoing, but on the same shipment request id

  • Set the config to have

$use_shipping_service_incoming_shipments_nde = False;
  • Go to /shipments/add again, create an EU shipment with 2 dewars, now "Use facility account" should let you still use 2 dewars
  • Check when you view the shipment it tells you you cannot use international shipping

@gfrn

gfrn commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Looks good to me, I didn't have a password for MSS, but all else works

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants