During code cleanup noticed the following validations were no longer being run on submissions:
def check_studies_compatible?(a, b)
errors.add(:study, "Can't mix contaminated and non contaminated human DNA") unless a.study_metadata.contaminated_human_dna == b.study_metadata.contaminated_human_dna
errors.add(:study, "Can't mix X and autosome removal with non-removal") unless a.study_metadata.remove_x_and_autosomes == b.study_metadata.remove_x_and_autosomes
end
This checks that all orders in a submission have studies with identical setting for contaminated_human_dna and remove_x_and_autosomes. I believe this was added at the request of NPG.
During code cleanup noticed the following validations were no longer being run on submissions:
This checks that all orders in a submission have studies with identical setting for contaminated_human_dna and remove_x_and_autosomes. I believe this was added at the request of NPG.
The changes were removed in https://github.com/sanger/sequencescape/commit/550e2714ce4a3548ad9bf9827c9de6e5bd98334a#diff-a399b9ece5a56b4730bb6c877e1a2713 when order validation was being relaxed. This was probably due to a failure of me to realise the extent of order compatibility validation when mapping the new requirements.
Checking with NPG to find out if this behaviour needs to be restored.