Skip to content

Commit

Permalink
fix: set $parent when creating task definition
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Oct 9, 2023
1 parent dc40691 commit de8f01d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ export default class ChangeElementTemplateHandler {
newTaskDefinition = createTaskDefinitionWithType(newPropertyValue, bpmnFactory);
}

newTaskDefinition.$parent = businessObject;

commandStack.execute('element.updateModdleProperties', {
element,
moddleElement: businessObject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ describe('cloud-element-templates/cmd - ChangeElementTemplateHandler', function(

expect(taskDefinition).to.exist;
expect(taskDefinition.get('type')).to.equal('task-type');

expect(taskDefinition.$parent).to.equal(getBusinessObject(task).get('extensionElements'));
}));


Expand Down Expand Up @@ -323,6 +325,8 @@ describe('cloud-element-templates/cmd - ChangeElementTemplateHandler', function(

expect(taskDefinition).to.exist;
expect(taskDefinition.get('type')).to.equal('task-type');

expect(taskDefinition.$parent).to.equal(getBusinessObject(task).get('extensionElements'));
}));


Expand All @@ -341,6 +345,8 @@ describe('cloud-element-templates/cmd - ChangeElementTemplateHandler', function(

expect(taskDefinition).to.exist;
expect(taskDefinition.get('type')).to.equal('task-type-old');

expect(taskDefinition.$parent).to.equal(getBusinessObject(task).get('extensionElements'));
}));

});
Expand Down

0 comments on commit de8f01d

Please sign in to comment.