Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIMS-1490: Use callback URL for incoming dewars via shipping service #852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ndg63276
Copy link
Collaborator

JIRA ticket: LIMS-1490

Summary:

If we are to fully use the shipping service for incoming dewars, we need to use the callback URL function to allow setting of the dewar status and tracking number, once the shipping service booking is complete.

Changes:

  • Add a new (non-authenticated) endpoint (/api/shipment/dewars/confirmpickup/sid/<shippingid>/token/<token>) for the shipping service to hit when an incoming dewar has been booked
    • Update the shipping status & dewar status to awb created or pickup booked as necessary
    • Update the dewar tracking number
    • Add lines to the DewarTransportHistory table
  • Use an md5 token to authenticate the new endpoint
  • Hide irrelevant fields on the Shipment page if the shipping service has been used

To test:

  • The dev instance needs to be on a .diamond.ac.uk address, so use a beamline workstation or deploy to ispyb-dev-
  • Set these variables in config.php
$use_shipping_service = True;
$use_shipping_service_incoming_shipments = True;
$shipping_service_api_url = "https://sample-shipping-test.diamond.ac.uk/api";
$shipping_service_api_user = "synchweb";
$shipping_service_api_password = <redacted>;
$shipping_service_app_url = "https://sample-shipping-test.diamond.ac.uk";
$use_shipping_service_redirect_incoming_shipments = True;
$use_shipping_service_redirect = True;
  • Create a shipment with more than one dewar in a UK proposal, eg mx23694
  • On the shipment page, click Create DHL Air Waybill
  • Tick the boxes for both dewars, click Use Facility Account and accept the terms
  • Click Proceed and you should be redirected to the Shipping Service
  • Fill in the address and request a pickup for the following day
  • Exit back to Synchweb, and:
    • check the Shipment status and both dewars' status is 'pickup booked'
    • check the "Tracking # to" has been filled for both dewars
    • check the history section has both "awb created" and "pickup booked"
    • check lots of the fields on the Shipment page have been hidden, eg Courier, Courier Account No etc
  • Rerun the previous test but don't request a pickup in the shipping service (untick the box). The shipping/dewar status should stay at "awb created" and the history should only have "awb created"
  • Set $use_shipping_service_redirect_incoming_shipments = False;, create and book a shipment without being redirected to the shipping service, check that still works. Check the Courier, Courier Account No etc fields are displayed.

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.

1 participant