Fix getBulkStatus() for OPEN operations (issue 36911) - #41245
Conversation
Count OPEN (and not-yet-persisted) operations as pending so getBulkStatus() returns Not Started or In Progress instead of Finished with Failure. Fixes magento#36911
|
Hi @parsoya. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
|
@magento run all tests |
|
@magento run Static Tests |
|
Relevant builds for this change are green: Unit Tests, Integration Tests, Semantic Version Checker, Database Compare, Magento Health Index, Preliminary Checks. This PR is a single commit, six files, all in Magento_AsynchronousOperations (BulkStatus.php + unit/integration tests). It does not touch storefront JS, admin order view, or MFTF. Remaining red checks are pre-existing / infrastructure and unrelated to getBulkStatus():
Happy to re-run a specific build if a maintainer asks. |
|
@magento run all tests |
Description (*)
BulkStatus::getBulkStatus()treated every persisted operation row as processed. OPEN rows were counted as complete, so a bulk that still had OPEN work (or work not persisted yet) was reported as Finished with Failure.This change counts:
magento_operationyetStatus is then:
Unit and integration tests cover all-OPEN and mixed OPEN/complete bulks.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
bin/magento queue:consumers:stopor disablecron_consumers_runner).magento_bulk.uuid.GET /V1/bulk/:uuid/statusor PHPBulkStatusInterface::getBulkStatus()).bin/magento queue:consumers:start product_action_attribute.update).Questions or comments
Admin Bulk Actions grid status uses
CalculatedStatusSql(MAX(status)), notgetBulkStatus(). This PR fixes the API /getBulkStatus()path reported in #36911. Grid display for all-OPEN bulks is unchanged.Contribution checklist (*)