Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOL-1260: use technical state machine name for log entry on reopen #663

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Service/Transition/TransactionTransitionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public function processTransaction(OrderTransactionEntity $transaction, Context
public function reOpenTransaction(OrderTransactionEntity $transaction, Context $context): void
{
$currentStatus = ($transaction->getStateMachineState() instanceof StateMachineStateEntity) ? $transaction->getStateMachineState()->getTechnicalName() : '';
$currentStatusName = ($transaction->getStateMachineState() instanceof StateMachineStateEntity) ? $transaction->getStateMachineState()->getName() : '';

if ($this->isFinalOrTargetStatus($currentStatus, [OrderTransactionStates::STATE_OPEN])) {
return;
Expand All @@ -85,7 +84,7 @@ public function reOpenTransaction(OrderTransactionEntity $transaction, Context $
$this->logger->error(
sprintf(
'It is not allowed to change status to open from %s. Aborting reopen transition',
$currentStatusName
$currentStatus
)
);

Expand Down
Loading