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-1466: Disable dispatch form validation when using the shipping service #891

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

Conversation

ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Jan 9, 2025

JIRA ticket: LIMS-1466

Summary:

The dispatch request form has quite strict validation, but little of it is used (or even displayed) if the shipping service will be used. This has led to problems where a hidden field fails validation and the user doesn't know how to fix the problem. We should disable validation if the shipping service is going to be used.

Changes:

  • Move validation patterns out of model file and into functions within view file
  • Tidy some whitespace

To test:

  • Enable $use_shipping_service and $use_shipping_service_redirect in config
  • Go to a test shipment (eg /shipments/sid/63609) and click "Dispatch"
  • Change the country to eg Aruba to show the full form
  • Add illegal characters to each field, check that they go red and display an error
  • Change the country to United Kingdom, the fields should now be hidden. Check you can Proceed to the shipping service.

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