Skip to content

Commit aaf23fb

Browse files
authored
Merge pull request #978 from Arnei/fix-workflow-paremeter-display-for-scheduled-events
Fix wf config values not showing for scheduled events
2 parents bed2cea + d7fd7be commit aaf23fb

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowTab.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ const EventDetailsWorkflowTab = ({
113113
const setInitialValues = () => {
114114
let initialConfig = undefined;
115115

116-
// TODO: Scheduled events are missing configuration for their workflow
117-
// Figure out why the config is missing
118116
if (baseWorkflow.configuration) {
119117
initialConfig = parseBooleanInObject(baseWorkflow.configuration);
120118
}

src/slices/eventDetailsSlice.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ export const fetchWorkflows = createAppAsyncThunk('eventDetails/fetchWorkflows',
13521352
workflow: {
13531353
workflowId: workflowsData.workflowId,
13541354
description: undefined,
1355-
configuration: undefined
1355+
configuration: workflowsData.configuration,
13561356
},
13571357
scheduling: true,
13581358
entries: [],
@@ -1869,7 +1869,8 @@ export const saveWorkflowConfig = createAppAsyncThunk('eventDetails/saveWorkflow
18691869

18701870
let header = getHttpHeaders();
18711871
let data = new URLSearchParams();
1872-
data.append("configuration", JSON.stringify(jsonData));
1872+
// Scheduler service in Opencast expects values to be strings, so we convert them here
1873+
data.append("configuration", JSON.stringify(jsonData, (k, v) => v && typeof v === 'object' ? v : '' + v));
18731874

18741875
axios
18751876
.put(`/admin-ng/event/${eventId}/workflows`, data, header)

0 commit comments

Comments
 (0)