@@ -15,7 +15,7 @@ import { getSelected, getSelectedDataDeprecated } from '../../actions';
1515
1616import { SampleOperation } from '../samples/constants' ;
1717import { SchemaQuery } from '../../../public/SchemaQuery' ;
18- import { getFilterForSampleOperation , isSamplesSchema } from '../samples/utils' ;
18+ import { getFilterForSampleOperation , isSamplesSchema , isWorkflowInputSamplesSchema } from '../samples/utils' ;
1919import { getQueryDetails , getRequestAuditDetail , importData , InsertOptions , selectDistinctRows } from '../../query/api' ;
2020import { caseInsensitive , generateId } from '../../util/utils' ;
2121import { request } from '../../request' ;
@@ -326,6 +326,7 @@ function resolveSampleParentTypes(
326326 * @param creationType
327327 * @param isItemSamples
328328 * @param targetQueryName
329+ * @param jobId
329330 */
330331async function initParents (
331332 initialParents : string [ ] ,
@@ -334,7 +335,8 @@ async function initParents(
334335 isSnapshotSelection : boolean ,
335336 creationType ?: EntityCreationType ,
336337 isItemSamples ?: boolean ,
337- targetQueryName ?: string
338+ targetQueryName ?: string ,
339+ jobId ?: string ,
338340) : Promise < List < EntityParentType > > {
339341 const isAliquotParent = creationType === EntityCreationType . Aliquots ;
340342
@@ -354,6 +356,9 @@ async function initParents(
354356 Filter . create ( 'RowId' , selectionResponse . selected , Filter . Types . IN ) ,
355357 Filter . create ( 'Container' , insertPermissionContainers , Filter . Types . IN ) ,
356358 ] ;
359+ if ( isWorkflowInputSamplesSchema ( schemaQuery ) && jobId ) {
360+ filterArray . push ( Filter . create ( 'JobId' , jobId , Filter . Types . EQUAL ) ) ;
361+ }
357362 const opFilter = getFilterForSampleOperation ( SampleOperation . EditLineage ) ;
358363 if ( opFilter ) {
359364 filterArray . push ( opFilter ) ;
@@ -489,7 +494,8 @@ export async function getChosenParentData(
489494 isSnapshotSelection ,
490495 creationType ,
491496 isItemSamples ,
492- targetQueryName
497+ targetQueryName ,
498+ model . jobId
493499 ) ;
494500
495501 // if we have an initial parent, we want to start with a row in the grid (entityCount = 1) otherwise we start with none
@@ -620,7 +626,6 @@ export async function getFolderConfigurableEntityTypeOptions(
620626 * @param targetQueryName the name of the listing schema query that represents the initial target for creation.
621627 * @param allowParents are parents of this entity type allowed or not
622628 * @param isItemSamples use the selectionKey from inventory.items table to query sample parents
623- * @param combineParentTypes
624629 */
625630export function getEntityTypeData (
626631 model : EntityIdCreationModel ,
0 commit comments