Skip to content

[GraphQl] Order of graphql request changes value for default qtys on grouped product. #40286

@Hexmage

Description

@Hexmage

Preconditions and environment

  • Confirmed to happen on both 2.4.6-p13 and 2.4.8-p3

  • Install a Magento environment with demo data.

Steps to reproduce

  1. Open the backend and open product 24-WG085_Group
  2. Scroll down to the grouped products and increase the default quantities to any value above 1 and save the product.
  3. Execute the following graphql request and check it's results:
  products(filter: { sku: { eq: "24-WG085_Group" } } ) {
    items {
        ... on GroupedProduct {
        items {
            qty
            position
            product {
              sku
            }
        }
        
      }
      price_range {
          maximum_price {
            final_price {
              currency
              value
            }
          }
          minimum_price {
            regular_price {
              value
              currency
            }
            final_price {
              currency
              value
            }
            discount {
              percent_off
            }
          }
        }
    }
  }
}
  1. Execute the following GraphQl request and check it's results:
query GetProducts {
  products(filter: { sku: { eq: "24-WG085_Group" } } ) {
    items {
         price_range {
          maximum_price {
            final_price {
              currency
              value
            }
          }
          minimum_price {
            regular_price {
              value
              currency
            }
            final_price {
              currency
              value
            }
            discount {
              percent_off
            }
          }
        }
        ... on GroupedProduct {
        items {
            qty
            position
            product {
              sku
            }
        }
        
      }
     
    }
  }
}

Expected result

The contents of the responses of steps 3 and 4 to be identical except for the order of the nodes.

Actual result

Step 3's results are what I would expect.

In step 4's results all the qty for the simple products attached to the grouped product have changed to 1. Instead of the actual value set.

For some reason requesting the product prices first changes something, which results in the qty's being updated to the wrong value.

Additional information

No response

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

Metadata

Metadata

Assignees

Labels

Area: FrameworkComponent: GraphQLGraphQLIssue: 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.Reported on 2.4.8-p3Indicates 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

Status

Ready for Development

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions