Skip to content

Commit 094e9c5

Browse files
[Workflow Transitions] Apply default value for additional fields (#956)
* workflow transitions: apply default value for additional fields * set field value --------- Co-authored-by: robertSt7 <[email protected]>
1 parent 4fab906 commit 094e9c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

public/js/pimcore/workflow/transitionPanel.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ pimcore.workflow.transitionPanel = Class.create({
272272
field.setHeight(100);
273273
}
274274

275+
if (typeof field.setValue !== "undefined") {
276+
field.setValue(c.defaultValue);
277+
} else {
278+
field.config.items[0]?.setValue(c.defaultValue);
279+
}
275280
} catch(e) {
276281
console.error('Could not add additional field');
277282
console.info(e);

0 commit comments

Comments
 (0)