diff --git a/src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowTab.tsx b/src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowTab.tsx index 628378d27e..58daad3acb 100644 --- a/src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowTab.tsx +++ b/src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowTab.tsx @@ -113,8 +113,6 @@ const EventDetailsWorkflowTab = ({ const setInitialValues = () => { let initialConfig = undefined; - // TODO: Scheduled events are missing configuration for their workflow - // Figure out why the config is missing if (baseWorkflow.configuration) { initialConfig = parseBooleanInObject(baseWorkflow.configuration); } diff --git a/src/slices/eventDetailsSlice.ts b/src/slices/eventDetailsSlice.ts index b582a939e7..2639433553 100644 --- a/src/slices/eventDetailsSlice.ts +++ b/src/slices/eventDetailsSlice.ts @@ -1352,7 +1352,7 @@ export const fetchWorkflows = createAppAsyncThunk('eventDetails/fetchWorkflows', workflow: { workflowId: workflowsData.workflowId, description: undefined, - configuration: undefined + configuration: workflowsData.configuration, }, scheduling: true, entries: [], @@ -1869,7 +1869,8 @@ export const saveWorkflowConfig = createAppAsyncThunk('eventDetails/saveWorkflow let header = getHttpHeaders(); let data = new URLSearchParams(); - data.append("configuration", JSON.stringify(jsonData)); + // Scheduler service in Opencast expects values to be strings, so we convert them here + data.append("configuration", JSON.stringify(jsonData, (k, v) => v && typeof v === 'object' ? v : '' + v)); axios .put(`/admin-ng/event/${eventId}/workflows`, data, header)