Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labkey/components",
"version": "6.49.1",
"version": "6.49.2",
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
"sideEffects": false,
"files": [
Expand Down
4 changes: 4 additions & 0 deletions packages/components/releaseNotes/components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# @labkey/components
Components, models, actions, and utility functions for LabKey applications and pages

### version 6.49.2
*Released*: 17 June 2025
- GitHub Issue 748: "View Assay Results for Selected" gives error when no rows have sample IDs

### version 6.49.1
*Released*: 16 June 2025
- GH Issue 796: App assay Samples > Find Derivatives in Sample Finder not working for field with special characters
Expand Down
10 changes: 7 additions & 3 deletions packages/components/src/internal/components/samples/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,12 @@ export async function createSessionAssayRunSummaryQuery(sampleIds: number[]): Pr
assayRunsQuery = 'AssayRunsPerSampleChildFolder';
}

// GitHub Issue 748: need to account for the case with no sampleIds
let whereClause = 'WHERE RowId IN (' + sampleIds.join(',') + ')\n';
if (sampleIds.length === 0) {
whereClause = 'WHERE 1 = 0\n'; // add where clause that will always result in zero rows
}

return await selectRowsDeprecated({
saveInSession: true,
schemaName: 'exp',
Expand All @@ -453,9 +459,7 @@ export async function createSessionAssayRunSummaryQuery(sampleIds: number[]): Pr
"FROM (SELECT RowId, SampleID, SampleType, Assay || ' Run Count' AS Assay FROM " +
assayRunsQuery +
') X\n' +
'WHERE RowId IN (' +
sampleIds.join(',') +
')\n' +
whereClause +
'GROUP BY RowId, SampleID, SampleType, Assay\n' +
'PIVOT RunCount BY Assay',
maxRows: 0, // we don't need any data back here, we just need to get the temp session schema/query
Expand Down