Skip to content

[Issue] fixing arguments for method in getStatusByState #30173

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #30172: fixing arguments for method in getStatusByState


Summary (*)

Magento 2.4-develop
if you will checking this condition
echo $select = $this->getConnection()->select() ->from(['sss' => $this->stateTable, []]) ->where('state = ?', $state) ->limit(1) ->columns(['status']);
then you see
SELECT sss.*, sss.statusFROMsales_order_status_stateASsss WHERE (state = 'complete') LIMIT 1
but method getStatusByState return is correct value - because the status of a certain state should return. But if this code is rewritten to get the state, then we will also get the status, this is all due to the incorrect parameter in the from method

Examples (*)

  1. echo $select in getStatusByState method should return sql like this
    SELECT sss.statusFROMsales_order_status_stateASsss WHERE (state = 'complete') LIMIT 1

Proposed solution

Metadata

Metadata

Assignees

Labels

Component: SalesFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions