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-1500: Set the dispatch request email recipients based on the dewar barcode #848

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

Conversation

ndg63276
Copy link
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 = '[email protected]';
$dispatch_email_regex = array(
    '[email protected]' => '/.*/',
    '[email protected]' => '/.*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.

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