Fix assay/experiment metrics bugs and modernize Java syntax#7613
Merged
labkey-jeckels merged 1 commit intodevelopfrom Apr 23, 2026
Merged
Fix assay/experiment metrics bugs and modernize Java syntax#7613labkey-jeckels merged 1 commit intodevelopfrom
labkey-jeckels merged 1 commit intodevelopfrom
Conversation
- Fix RequiredSourceParentsForSampleTypes metric using .first (sample count) instead of .second (source/data count) in ExperimentServiceImpl - Fix protocolsWithTransformScriptRunOnEditCount using INSERT LIKE pattern instead of UPDATE; both edit and import metrics were counting the same thing - Parameterize SQL queries in ExperimentModule assay metrics - Extract ScriptType private enum to public TRANSFORM_SCRIPT_PROPERTY_NAME constant so ExperimentModule can reference it without duplication - Remove dead PageFlowUtil methods: streamTextAsImage() and getSessionId() - Modernize Java syntax: unnamed lambda vars, getFirst(), pattern variables, URI.create(), isEmpty() - Improve XML serialization error to use logger instead of printStackTrace() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
labkey-nicka
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Fix two pre-existing bugs in experiment/assay metrics reporting, and clean up related code as part of the same pass.
Related Pull Requests
None
Changes
RequiredSourceParentsForSampleTypesinExperimentServiceImpl.getParentAliasMetrics()was reportingsamplesMetrics.first(sample parent count) instead ofsamplesMetrics.second(source/data parent count)protocolsWithTransformScriptRunOnEditCountinExperimentModulewas using the sameLIKE '%"INSERT"%'pattern as the import count; now correctly usesTransformOperation.UPDATEScriptTypeenum (single value) with apublic static final TRANSFORM_SCRIPT_PROPERTY_NAMEconstant, allowingExperimentModuleto reference it without duplicationExperimentModulePageFlowUtilmethodsstreamTextAsImage()andgetSessionId()_),List.getFirst(), instanceof pattern variables,URI.create(),isEmpty()printStackTrace()with proper_log.error()in XML serialization error handler