Closed
Description
Preconditions and environment
- Magento version 2.4.7
Steps to reproduce
- Try to update status from admin order page view
Expected result
Status updated
Actual result
Status not updated
Additional information
I don't understand this change introduced in 2.4.7 :
#36562
private function getOrderStatus(string $orderStatus, string $historyStatus): string
{
return ($orderStatus === Order::STATE_PROCESSING || $orderStatus === Order::STATUS_FRAUD) ? $historyStatus
: $orderStatus;
}
Why would we be able to change status only if current status is processing or fraud ? (Also, Order::STATE_PROCESSING
instead of Order::STATUS_PROCESSING
)
If I understand correctly the issue #36562, the fix should be something like this instead :
private function getOrderStatus(OrderInterface $order, string $historyStatus): string
{
$statuses = $this->orderConfig->getStateStatuses($order->getState());
if (!in_array($status, array_keys($statuses))) {
return $order->getStatus();
}
return $historyStatus;
}
Or am I missing something ?
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.