diff --git a/.changeset/import-run-automations-default-on.md b/.changeset/import-run-automations-default-on.md new file mode 100644 index 000000000..576f8e239 --- /dev/null +++ b/.changeset/import-run-automations-default-on.md @@ -0,0 +1,8 @@ +--- +'@object-ui/plugin-grid': patch +--- + +ImportWizard now defaults the "Run automations & triggers" checkbox to ON +(framework#2922): automations always ran on import before the server honored +the flag, so preserving behavior means opt-out rather than opt-in. The reset +path restores the same default. diff --git a/packages/plugin-grid/src/ImportWizard.tsx b/packages/plugin-grid/src/ImportWizard.tsx index 86d9bebd7..bd042227c 100644 --- a/packages/plugin-grid/src/ImportWizard.tsx +++ b/packages/plugin-grid/src/ImportWizard.tsx @@ -1468,7 +1468,9 @@ export const ImportWizard: React.FC = ({ const [writeMode, setWriteMode] = useState('insert'); const [matchFields, setMatchFields] = useState([]); const [createMissingOptions, setCreateMissingOptions] = useState(false); - const [runAutomations, setRunAutomations] = useState(false); + // Default ON: automations always ran on import before framework#2922 wired + // the flag up server-side, so preserving behavior means opt-out, not opt-in. + const [runAutomations, setRunAutomations] = useState(true); const [skipBlankMatchKey, setSkipBlankMatchKey] = useState(false); // Opt-in: route this import through a background job even when the row count // is under the async threshold. This is the only way to obtain an undoable @@ -1970,7 +1972,7 @@ export const ImportWizard: React.FC = ({ setStep('upload'); setHeaders([]); setRows([]); setMapping({}); setProgress(0); setResult(null); setCorrections({}); setSelectedTemplateId(null); setMappingName(null); setWriteMode('insert'); setMatchFields([]); - setCreateMissingOptions(false); setRunAutomations(false); setSkipBlankMatchKey(false); + setCreateMissingOptions(false); setRunAutomations(true); setSkipBlankMatchKey(false); setJobId(null); setAsyncCounts(null); setValidating(false); setDryRunResult(null); setShowHistory(false);