Skip to content

[Issue] Cannot update Order status in 2.4.7 #38659

Closed
@Nuranto

Description

@Nuranto
Contributor

Preconditions and environment

  • Magento version 2.4.7

Steps to reproduce

  1. 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”.

Activity

m2-assistant

m2-assistant commented on Apr 25, 2024

@m2-assistant

Hi @Nuranto. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

self-assigned this
on Apr 25, 2024
m2-assistant

m2-assistant commented on Apr 25, 2024

@m2-assistant

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    5. Add label Issue: Confirmed once verification is complete.
    6. Make sure that automatic system confirms that report has been added to the backlog.
changed the title [-]Order status update[/-] [+][Issue] Cannot update Order status in 2.4.7[/+] on Apr 25, 2024
removed their assignment
on Apr 25, 2024
self-assigned this
on Apr 25, 2024
m2-assistant

m2-assistant commented on Apr 25, 2024

@m2-assistant

Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

engcom-Dash

engcom-Dash commented on Apr 25, 2024

@engcom-Dash
Contributor

@magento give me 2.4-develop instance

added a commit that references this issue on Apr 25, 2024

magento#38659 - Fix order status update

magento-deployment-service

magento-deployment-service commented on Apr 25, 2024

@magento-deployment-service

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

65 remaining items

YiffyToys

YiffyToys commented on Sep 13, 2024

@YiffyToys

No milestone = release set?

hostep

hostep commented on Sep 13, 2024

@hostep
Contributor

Based on the Jira ticket, the target version is 2.4.8-beta1.

Source: #38917 (comment)

guilhermemap

guilhermemap commented on Sep 23, 2024

@guilhermemap

same issue here on 2.4.7-p2

engcom-Delta

engcom-Delta commented on Dec 2, 2024

@engcom-Delta
Contributor

Hi @Nuranto @guilhermemap,

Thanks for reporting and collaboration.
We have re-verified the issue in Latest 2.4-develop instance , but we are unable to reproduce the issue. Kindly refer the screenshots.

Steps to reproduce

  1. Create a order status
  2. Assign respective order status to state code processing
    image
  3. Place an order.
  4. Create invoice. observe status is set as teststatus as it was set as default for processing.
  5. Now, Change the status to processing, observe user is able to update the status successfully.
Able.to.update.order.status.1.mp4

Can you please re-verify and confirm if you are still facing the issue.
Thanks.

guilhermemap

guilhermemap commented on Dec 18, 2024

@guilhermemap

We are still with the same issue in the 2.4.7-p2 version, via the admin page we can only change from the default processing status (processing state) once to a custom state. After this we can't change to another status in the same state, not even the default one. Also, in the complete state we can't change the status at all.
Our current solution is to use the rest api (POST in the /orders/ endpoint with entity: {entity_id, state, status}, the /orders//comments endpoint does not work to change the status in this situation).

engcom-Delta

engcom-Delta commented on Dec 23, 2024

@engcom-Delta
Contributor

Hi @guilhermemap ,

Thanks for reporting and collaboration.
We have re-verified the issue in 2.4.7-p3 and 2.4.8-beta1 instance. Issue is only reproducible in 2.4.7 instance and fixed in latest versions.
Can you please reverify in latest 2.4 develop or 2.4.8-beta 1 instance.

Related commits: https://github.com/search?q=repo%3Amagento%2Fmagento2+ACP2E-3178&type=commits

Thanks.

vbidou

vbidou commented on Mar 26, 2025

@vbidou

We can witness that the issue is still there in v2.4.7-p3
It applies also to Order STATE "Complete"
Waiting for 2.4.8 release, hoping that it will be fully resolved.
Status updates are a vital component of eCommerce experience.

engcom-Delta

engcom-Delta commented on Mar 28, 2025

@engcom-Delta
Contributor

Hi @vbidou ,

Thanks for reporting and collaboration.
We have re-verified the issue in 2.4.7-p3 and 2.4 develop instance. Issue is only reproducible in 2.4.7 instance and fixed in latest versions.
Can you please reverify in latest 2.4 develop.

completestatus.mp4

Thanks.

added a commit that references this issue on May 8, 2025
faea8e3
added a commit that references this issue on May 8, 2025
0d7a7a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: OrderComponent: order statusIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.7Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @hostep@superdav42@Quazz@Nuranto@redati

    Issue actions

      [Issue] Cannot update Order status in 2.4.7 · Issue #38659 · magento/magento2