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-1330: Use experimentTypeId if specified #796

Conversation

ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Jul 2, 2024

JIRA ticket: LIMS-1330

Summary:

There are 2 ways a DataCollectionGroup can have an experiment type:

  1. By setting the DataCollectionGroup.experimentType to a suitable enum
  2. By setting the DataCollectionGroup.experimentTypeId to a suitable integer, and then getting the ExperimentType.name field.

Synchweb should be able to cope with both.

Changes:

  • Use IFNULL(ExperimentType.name, DataCollectionGroup.experimentType) to cope with both possible ways, favouring the experimentTypeId route.
  • Add extra joins to ExperimentType table and add it to the list of valid tables
  • Remove the counting of experimentTypes in Sample.php, these do not seem to be used anywhere, and there are no data collection groups in the database with experimentType set to 'XRF map', 'XRF spectrum' or 'Energy Scan', and these are not valid names in the ExperimentType table.

To test:

  • Go to a data collection group eg /dc/visit/cm37235-3/dcg/12121608, check the experiment type is listed as SAD
  • Check the data collections don't show when you click the "Screenings" filter, but do show when you click the "Full Collections" filter
  • update DataCollectionGroup set experimentTypeId=7 where dataCollectionGroupId=12121608;, check same page updates to say MAD, filters still work
  • update DataCollectionGroup set experimentType=null where dataCollectionGroupId=12121608;, check same page still shows MAD, filters still work
  • Check the /samples page still looks the same
  • Check the visit stats page (/stats/visit/cm37235-3) still looks the same (I don't believe the _error_log() function is called anywhere)

@ndg63276 ndg63276 changed the base branch from master to pre-release/2024-R3.3 July 23, 2024 09:51
@ndg63276 ndg63276 merged commit 78a1bc4 into pre-release/2024-R3.3 Jul 23, 2024
2 checks passed
@ndg63276 ndg63276 deleted the improvement/LIMS-1330/use-experimenttypeid-if-specified branch August 12, 2024 14:41
ndg63276 added a commit that referenced this pull request Aug 12, 2024
* LIMS-1370: Handle errors from the shipping service (#804)

* LIMS-1330: Use experimentTypeId if specified (#796)

* LIMS-1240: Dont use shortComments LIKE 'EDNA%' (#795)

* LIMS-1350: Display crystal snapshots even if zipped (#807)

* LIMS-1369: Make fault report titles editable (#802)

* LIMS-1341: Allow entry of SMILES codes (#793)
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.

2 participants