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

[Issue] Cannot update Order status in 2.4.7 #38659

Open
1 of 5 tasks
Nuranto opened this issue Apr 25, 2024 · 17 comments · May be fixed by #38661
Open
1 of 5 tasks

[Issue] Cannot update Order status in 2.4.7 #38659

Nuranto opened this issue Apr 25, 2024 · 17 comments · May be fixed by #38661
Assignees
Labels
Area: Order Component: order status Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: PR in progress Reported on 2.4.7 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@Nuranto
Copy link
Contributor

Nuranto commented Apr 25, 2024

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”.
Copy link

m2-assistant bot commented Apr 25, 2024

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.

Copy link

m2-assistant bot commented Apr 25, 2024

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.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.7 Indicates original Magento version for the Issue report. label Apr 25, 2024
@Nuranto Nuranto changed the title Order status update [Issue] Cannot update Order status in 2.4.7 Apr 25, 2024
@engcom-Bravo engcom-Bravo removed their assignment Apr 25, 2024
@engcom-Dash engcom-Dash self-assigned this Apr 25, 2024
Copy link

m2-assistant bot commented Apr 25, 2024

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
Copy link

@magento give me 2.4-develop instance

Nuranto added a commit to webcooking/magento2 that referenced this issue Apr 25, 2024
Copy link

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

@Nuranto Nuranto linked a pull request Apr 25, 2024 that will close this issue
5 tasks
Copy link

@engcom-Dash
Copy link

@magento give me 2.4-develop instance

Copy link

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

Copy link

@engcom-Dash
Copy link

engcom-Dash commented Apr 29, 2024

Hi @Nuranto

Thanks for reporting and collaboration.

Can you please provide detailed steps to reproduce with screenshots which would help us reproduce the issue accurately

Thanks!

@engcom-Dash engcom-Dash added the Issue: needs update Additional information is require, waiting for response label Apr 29, 2024
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Apr 29, 2024
@Nuranto
Copy link
Contributor Author

Nuranto commented Apr 29, 2024

@engcom-Dash
Copy link

Hi @Nuranto

Verified the issue in 2.4.7 and 2.4 dev instances.

But I am seeing only processing and suspend fraud options in order status after generating invoice.

Please refer to the screenshots. Let us know if we are missing anything.

Screenshot 2024-04-29 at 2 41 49 PM

@Nuranto
Copy link
Contributor Author

Nuranto commented Apr 29, 2024

I added a custom status on your temporary env.

As you can see in the code :

private function getOrderStatus(string $orderStatus, string $historyStatus): string
    {
        return ($orderStatus === Order::STATE_PROCESSING || $orderStatus === Order::STATUS_FRAUD) ? $historyStatus
            : $orderStatus;
    }

We can update status, but only if current status is processing or fraud.

@engcom-Dash
Copy link

Hi @Nuranto

Thanks for reporting and collaboration.

Verified the issue on magento 2.4 dev and 2.4.7 instances and the issue is reproducible. Hence, we are confirming the issue.

We are able to update the status only if the current status is in a processing or fraud state. If the status is anything other than processing or fraud state we are not able to update the status.

Please refer the attached screen recording.

Screen.Recording.2024-04-29.at.7.54.07.PM.mov

@engcom-Dash engcom-Dash added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Component: order status labels Apr 29, 2024
@m2-community-project m2-community-project bot removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Apr 29, 2024
@m2-community-project m2-community-project bot moved this from Needs Update to Confirmed in Issue Confirmation and Triage Board Apr 29, 2024
@engcom-Dash engcom-Dash added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. labels Apr 29, 2024
@m2-community-project m2-community-project bot removed the Issue: needs update Additional information is require, waiting for response label Apr 29, 2024
@m2-community-project m2-community-project bot added this to Pull Request In Progress in High Priority Backlog Apr 29, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-11877 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Apr 29, 2024

✅ Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-11877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Order Component: order status Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: PR in progress Reported on 2.4.7 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
High Priority Backlog
  
Pull Request In Progress
Development

Successfully merging a pull request may close this issue.

4 participants