Skip to content

Commit

Permalink
Merge pull request #978 from Arnei/fix-workflow-paremeter-display-for…
Browse files Browse the repository at this point in the history
…-scheduled-events

Fix wf config values not showing for scheduled events
  • Loading branch information
lkiesow authored Nov 19, 2024
2 parents bed2cea + d7fd7be commit aaf23fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
5 changes: 3 additions & 2 deletions src/slices/eventDetailsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ export const fetchWorkflows = createAppAsyncThunk('eventDetails/fetchWorkflows',
workflow: {
workflowId: workflowsData.workflowId,
description: undefined,
configuration: undefined
configuration: workflowsData.configuration,
},
scheduling: true,
entries: [],
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit aaf23fb

Please sign in to comment.