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-753: Allow LN2 topups as part of dewar history #856

Conversation

ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Nov 4, 2024

JIRA ticket: LIMS-753

Summary:

We record every time a dewar is topped up with LN2, but in the Dewar.comments field. In order to let the users know what has happened to their dewar, we should record it in the DewarTransportHistory table.
Once this code is live, I can edit the Dewar Logistics code to use this endpoint instead.

Changes:

  • Allow usage of the shipments/dewars/history endpoint with a STATUS instead of a LOCATION.
  • Update only DewarTransportHistory (and not Dewar) if only STATUS given
  • Only send emails if the location has changed (and other criteria met)

To test:

  • Edit the $bcr variable in config.php to include the IP of a machine you can ping your server from
  • Use python requests library (or similar) to hit the endpoint:
>>> import requests
>>> url = server_address + "/api/shipment/dewars/history"
>>> data = {"BARCODE": valid_dewar_barcode, "STATUS": "LN2 topped up"}
>>> r = requests.post(url, json=data)

If you get a 401 response, double check the $bcr variable. If you get a 200, go the dewar page on your Synchweb instance and check if the status has been added to the history. If no history shows, you might need to remove your IP from $bcr, it can get in the way. It should look like this:
image

  • Repeat the test with a LOCATION sent in instead of STATUS. Check the dewar location has changed in both the Dewar and DewarTransportHistory tables.

@ndg63276 ndg63276 changed the base branch from master to pre-release/2024-R5.3 December 3, 2024 09:23
@ndg63276 ndg63276 merged commit 53b2d34 into pre-release/2024-R5.3 Dec 3, 2024
2 checks passed
ndg63276 added a commit that referenced this pull request Dec 16, 2024
…882)

* LIMS-1498: Change name of processed data archive (#855)

* LIMS-1469: Fix download button on old summary page (#840)

* LIMS-1463: Always display Mesh3D data collections as grid scans (#845)

* LIMS-1515: Add energy value to data collections (#853)

* LIMS-261: Allow download of PDB files (#857)

* LIMS-1529: Fix fast ep model viewer (#858)

* LIMS-753: Allow LN2 topups as part of dewar history (#856)

* LIMS-1530: Add To Queue Fails when Not Completed filter applied (#864)

* LIMS-1530: Add To Queue Fails when Not Completed filter applied

* LIMS-1552: Remove old jquery (#871)

* LIMS-1500: Set the dispatch request email recipients based on the dewar barcode (#848)

* LIMS-1458: Fix GitHub warnings (#841)

---------

Co-authored-by: Mark Williams <[email protected]>
Co-authored-by: Guilherme Francisco <[email protected]>
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