Skip to content

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

Merged
ndg63276 merged 1 commit into
pre-release/2024-R5.3from
improvement/LIMS-1500/set-dispatch-email-recpts-based-on-barcode
Dec 3, 2024
Merged

LIMS-1500: Set the dispatch request email recipients based on the dewar barcode#848
ndg63276 merged 1 commit into
pre-release/2024-R5.3from
improvement/LIMS-1500/set-dispatch-email-recpts-based-on-barcode

Conversation

@ndg63276
Copy link
Copy Markdown
Collaborator

JIRA ticket: LIMS-1500

Summary:

Local contacts no longer get dispatch request emails, but I19 staff would like to receive emails for i19 dewars. So we can implement a set of regex patterns to decide who gets an email based on the dewar barcode.

Changes:

  • Introduce a new config variable called $dispatch_email_regex, of an array of email addresses and regex patterns.
  • Add each email address to the list of recipients if the pattern matches the dewar barcode.

To test:

$dispatch_email = 'stores.staff@diamond.ac.uk';
$dispatch_email_regex = array(
    'mx.staff@diamond.ac.uk' => '/.*/',
    'i19.staff@diamond.ac.uk' => '/.*i19.*/',
);
  • Turn on the shipping service
$use_shipping_service = True;
$use_shipping_service_redirect = True;
$shipping_service_api_url = "https://sample-shipping-test.diamond.ac.uk/api";
$shipping_service_app_url = "https://sample-shipping-test.diamond.ac.uk";
  • Request a dispatch for a dewar in the mx23694 proposal, check emails would be sent to stores.staff and mx.staff
  • Create a dewar in the cm37266 proposal, setting a future visit so the barcode contains "i19", request dispatch and check emails would be sent to stores.staff, mx.staff and i19.staff.
  • Turn off the shipping service:
$use_shipping_service = False;
$use_shipping_service_redirect = False;
  • Request a dispatch for a dewar in the mx23694 proposal, check emails would be sent to stores.staff and mx.staff
  • Create a dewar in the cm37266 proposal, setting a future visit so the barcode contains "i19", request dispatch and check emails would be sent to stores.staff, mx.staff and i19.staff.

Copy link
Copy Markdown
Collaborator

@gfrn gfrn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the shipping service cannot reach my development machine, I've tested it out by sending a manual request to the dispatch confirmation callback endpoint, and it works as expected.

@ndg63276 ndg63276 changed the base branch from master to pre-release/2024-R5.3 December 3, 2024 09:25
@ndg63276 ndg63276 merged commit 6e51851 into pre-release/2024-R5.3 Dec 3, 2024
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 <mark.williams@diamond.ac.uk>
Co-authored-by: Guilherme Francisco <guilherme.de-freitas@diamond.ac.uk>
@ndg63276 ndg63276 deleted the improvement/LIMS-1500/set-dispatch-email-recpts-based-on-barcode branch April 22, 2025 08:56
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