Skip to content

Commit

Permalink
fix(protocol-designer): candidate-C bug addressing and don't unnecess…
Browse files Browse the repository at this point in the history
…arily migrate

closes RQA-2772 RQA-2773 RQA-2776
  • Loading branch information
jerader committed May 23, 2024
1 parent d5eb9c7 commit 91d38c1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ export const getUnusedTrash = (
wasteChute != null
? commands?.some(
command =>
command.commandType === 'moveToAddressableArea' &&
WASTE_CHUTE_ADDRESSABLE_AREAS.includes(
command.params.addressableAreaName as AddressableAreaName
)
(command.commandType === 'moveToAddressableArea' &&
WASTE_CHUTE_ADDRESSABLE_AREAS.includes(
command.params.addressableAreaName as AddressableAreaName
)) ||
(command.commandType === 'moveLabware' &&
command.params.newLocation !== 'offDeck' &&
'addressableAreaName' in command.params.newLocation &&
command.params.newLocation.addressableAreaName ===
'gripperWasteChute')
)
: null

return {
trashBinUnused: trashBin != null && !hasTrashBinCommands,
wasteChuteUnused: wasteChute != null && !hasWasteChuteCommands,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export function CreateFileWizard(): JSX.Element | null {
values.pipettesByMount,
(acc, formPipette: FormPipette, mount): PipetteFieldsData[] => {
return formPipette?.pipetteName != null &&
formPipette?.pipetteName !== '' &&
formPipette.tiprackDefURI != null &&
(mount === 'left' || mount === 'right')
? [
Expand Down
6 changes: 5 additions & 1 deletion protocol-designer/src/load-file/migration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ export const getMigrationVersionsToRunFromVersion = (
const allSortedVersions = Object.keys(migrationsByVersion).sort(
semver.compare
)
return takeRightWhile(allSortedVersions, v => semver.gt(v, version))

return takeRightWhile(
allSortedVersions,
v => semver.gt(v, version) && !version.includes(v)
)
}

const allMigrationsByVersion: MigrationsByVersion = {
Expand Down
6 changes: 4 additions & 2 deletions protocol-designer/src/step-forms/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1355,10 +1355,9 @@ export const additionalEquipmentInvariantProperties = handleActions<NormalizedAd
command.params.newLocation !== 'offDeck' &&
'addressableAreaName' in command.params.newLocation &&
WASTE_CHUTE_ADDRESSABLE_AREAS.includes(
command.params.addressableAreaName
command.params.newLocation.addressableAreaName
))
)

const getStagingAreaSlotNames = (
commandType: 'moveLabware' | 'loadLabware',
locationKey: 'newLocation' | 'location'
Expand Down Expand Up @@ -1519,6 +1518,9 @@ export const additionalEquipmentInvariantProperties = handleActions<NormalizedAd
) {
wasteChuteId = moveLiquidStepWasteChute.blowOut_location
}
// new wasteChuteId generated for if there are only moveLabware commands
} else if (hasWasteChuteCommands && moveLiquidStepWasteChute == null) {
wasteChuteId = `${uuid()}:wasteChute`
}

const wasteChute =
Expand Down

0 comments on commit 91d38c1

Please sign in to comment.