Skip to content
Snippets Groups Projects
Commit e3316a5c authored by johnv's avatar johnv
Browse files

Issue #2631040: machine_name of config_transition not always correct

parent 815c2961
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@ class WorkflowConfigTransitionRoleForm extends WorkflowConfigTransitionFormBase
if ($to_state->isCreationState()) {
continue;
}
// Only allow transitions from $from_state.
// Only allow transitions from $from_state.
if ($state->id() <> $from_state->id()) {
continue;
}
......
......@@ -106,7 +106,7 @@ class WorkflowConfigTransition extends ConfigEntityBase implements WorkflowConfi
// Create the machine_name. This can be used to rebuild/revert the Feature in a target system.
if (empty($this->id())) {
$wid = $workflow->id();
$this->set('id', implode('', [$wid, str_replace($wid, '', $this->from_sid), str_replace($wid, '', $this->to_sid)]));
$this->set('id', implode('', [$wid, substr($this->from_sid, strlen($wid)), substr($this->to_sid, strlen($wid))]));
}
$status = parent::save();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment