Skip to content

Commit

Permalink
MOL-1260: use technical state machine name for log entry on reopen (#663
Browse files Browse the repository at this point in the history
)
  • Loading branch information
boxblinkracer authored Dec 4, 2023
1 parent f52ae30 commit ab42644
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit ab42644

Please sign in to comment.