Skip to content

Conversation

@ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Oct 27, 2025

JIRA ticket: LIMS-1956

Summary:

The shipping service will soon accept the names and serial numbers of dewars, and a visit number if known. We should pass in this information.

Changes:

  • Remove somewhat redundant $shipping_service_api_url variable
  • Get dewar facility codes, serial numbers, and visit numbers (default to 0), and pass them over to the shipping service

To test:

  • Set the config variables as
$use_shipping_service = 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>;
$shipping_service_links_in_emails = True;
$use_shipping_service_redirect_incoming_shipments = False;
$use_shipping_service_redirect = False;
  • Go to any proposal (eg mx23694) and create a shipment with 1 dewar, choosing a specific facility code (eg DLS-MX-0001), and tick the box that it will be for UDC
  • Click Create DHL Air Waybill, then tick the box next to the dewar, then click "Use Facility Account" and Accept the terms. Fill in the Package Location, Shipping Date, Ready By time and Close time (eg to tomorrow 9am-5pm), and click Create Air Waybill.
  • Go to https://sample-shipping-test.diamond.ac.uk/shipments?search=&page=1&limit=20&journey_type= and check a shipment has been created. Check the facility code is listed under the "Named Containers" column. Check the cost centre is the proposal with visit number 0 (eg mx23694-0)
  • Make a new shipment as before, but choosing no facility code (ie the "-" option). This time the shipment should show a "Dewar1" under Named Containers.
  • Make a new shipment as before (with a facility code), but this time before creating the air waybill, set the visit on the dewar. If there is a future visit in the db you can do this in Synchweb, but if not you can do it in the db by
update Dewar set firstExperimentId=27563122 where dewarId=xxxxx;
  • Create the air waybill, this time check the shipping service shipments page shows the cost centre including the visit eg mx23694-146.
  • Now click the Dispatch button next to the dewar, you will be taken to the Synchweb dispatch page. The visit should be pre-selected, then click "Request Dewar Dispatch".
  • Check the shipping service shipments page, it should show the cost centre with the visit, and the Named Container should have the facility code or Dewar1 as appropriate.
  • Now edit these config variables:
$use_shipping_service_redirect_incoming_shipments = True;
$use_shipping_service_redirect = True;
  • Make another shipment, using DLS-MX-9999 as it has a serial number associated with it ("abc-123")
  • Click Create DHL Air Waybill, then tick the box next to the dewar, then click "Use Facility Account" and Accept the terms. The form should now get shorter and give you a Proceed button which redirects you to the shipping service.
  • Fill in an address, and collection details, and then click Submit, which should book the shipment, and then click Done to return to Synchweb.
  • The shipping service shipments page should again show the Named Container, and the Cost Centre will include as visit of 0.
  • Go to the shipment requests page at https://sample-shipping-test.diamond.ac.uk/shipment-requests/, then look in the dev console at the request to https://sample-shipping-test.diamond.ac.uk/api/shipment_requests. You should be able to see the serial number in the response (response.items[0].containers[0].serial_number)
  • Click Dispatch on the dewar, Proceed to the shipping service, fill in the address and click Submit and then Done. Check the cost centre includes a visit of 0, the dewar is listed in the Named Container column, and check in the shipment requests page dev console for the serial number.
  • Make another shipment and add the visit as before. Create the DHL Air Waybill as above. Check the cost centre includes the visit number.
  • Dispatch this dewar and check the cost centre includes the correct visit.

@ndg63276 ndg63276 marked this pull request as ready for review November 7, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants