{"data":{"id":"magento2-40431","source":"github-pr","sourceRef":"magento/magento2#40431","title":"Product stock alert's website and stock mismatch issue for multi website","pr":{"number":40431,"url":"https://github.com/magento/magento2/pull/40431","author":"KrasnoshchokBohdan","mergedAt":"2026-03-05T14:41:21Z","mergeCommit":"eaccc339293e8cd5d049962b2a68a45cdfd380b2","headCommit":"17dbf7a20845bca25fa351108a4b10ccc9425f91","baseRef":"2.4-develop","diffSha256":"941e9415eb1d9dbcfae3ced7463e44a48dd42f893683e36d886d39b2faa13178"},"issues":[{"number":40027,"url":"https://github.com/magento/magento2/issues/40027","title":"Product stock alert's website and stock mismatch issue for multi website","labels":["Area: Catalog","Component: ProductAlert","Issue: Confirmed","Priority: P2","Progress: PR Created","Progress: done","Reported on 2.4.8-p1","Reproduced on 2.4.x"],"kind":"human"}],"fixedIn":"2.4.9","containingTags":["2.4.9"],"reportedOn":"2.4.8-p1","codeMatch":{"2.4.6":"clean","2.4.6-p1":"clean","2.4.6-p2":"clean","2.4.6-p3":"clean","2.4.6-p4":"clean","2.4.6-p5":"clean","2.4.6-p6":"clean","2.4.6-p7":"clean","2.4.6-p8":"clean","2.4.6-p9":"clean","2.4.6-p10":"clean","2.4.6-p11":"clean","2.4.6-p12":"clean","2.4.6-p13":"clean","2.4.6-p14":"clean","2.4.6-p15":"clean","2.4.7":"clean","2.4.7-p1":"clean","2.4.7-p2":"clean","2.4.7-p3":"clean","2.4.7-p4":"clean","2.4.7-p5":"clean","2.4.7-p6":"clean","2.4.7-p7":"clean","2.4.7-p8":"clean","2.4.7-p9":"clean","2.4.7-p10":"clean","2.4.8":"clean","2.4.8-p1":"clean","2.4.8-p2":"clean","2.4.8-p3":"clean","2.4.8-p4":"clean","2.4.8-p5":"clean","2.4.9":"conflict"},"affectedVersions":["2.4.6","2.4.6-p1","2.4.6-p2","2.4.6-p3","2.4.6-p4","2.4.6-p5","2.4.6-p6","2.4.6-p7","2.4.6-p8","2.4.6-p9","2.4.6-p10","2.4.6-p11","2.4.6-p12","2.4.6-p13","2.4.6-p14","2.4.6-p15","2.4.7","2.4.7-p1","2.4.7-p2","2.4.7-p3","2.4.7-p4","2.4.7-p5","2.4.7-p6","2.4.7-p7","2.4.7-p8","2.4.7-p9","2.4.7-p10","2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5"],"components":["magento/module-product-alert"],"files":[{"path":"app/code/Magento/ProductAlert/Model/ResourceModel/Price/Customer/Collection.php","change":"modified","package":"magento/module-product-alert"},{"path":"app/code/Magento/ProductAlert/Model/ResourceModel/Stock/Customer/Collection.php","change":"modified","package":"magento/module-product-alert"}],"stripped":{"tests":["dev/tests/integration/testsuite/Magento/ProductAlert/Model/ResourceModel/Stock/Customer/Collection/MultiWebsiteTest.php"],"docs":[],"outsideCode":[]},"linesChanged":21,"mergeBatched":false,"excluded":null,"sections":{"description":"For all the website's stock alerts, it is showing same website and stock where customer account is created.","stepsToReproduce":"1. Create customer account on website A.\n2. Subscribe to \"Notify me when this product is in stock\" alert from OOS product's PDP.\n3. Logout and Login to website B with same customer.\n4. Subscribe stock notify me on same product.\n5. Open admin product edit page where it's showing only website A and there stock in stock alert.","expectedResult":"It should be show the correct website and stock instead of website from customer account is created.\n\n![Image](https://github.com/user-attachments/assets/fd6b9730-18bf-45a7-8a1f-ac3e724da538)","actualResult":"For all the website's stock alerts, it is showing same website and stock where customer account is created.\n\n![Image](https://github.com/user-attachments/assets/e63960f2-7216-4b49-9a6f-9e8480d57ed2)","source":"issue"},"signatures":[],"labels":{"area":["Catalog"],"component":["ProductAlert"],"priority":"P2","severity":null,"reportedOn":["2.4.8-p1"]},"categories":["Catalog/Product"],"triage":{"model":"@cf/cloudflare/clef","requestHash":"5aa99c97e669cbe911639c2522310f9680280b186700fac27c1d1752485addb3","isBugfix":0.9773,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.964,"feature":0.0067,"refactor":0.0114,"tests_only":0.0099,"docs_only":0.0039,"dependency":0.0041},"confidence":0.9155},"scope":{"score":0.6196,"probabilities":{"0":0.4915,"1":0.3973,"2":0.1112},"confidence":0.1177},"risk":{"score":0.1804,"probabilities":{"0":0.8506,"1":0.1183,"2":0.0311},"confidence":0.6078},"area":{"choice":"catalog","probabilities":{"catalog":0.4791,"checkout":0.0095,"customer":0.0278,"admin":0.4189,"graphql_api":0.006,"framework":0.0135,"frontend":0.0124,"other":0.0328},"confidence":0.3227},"securityRelevant":0.0064,"reportedVersion":{"choice":"2.4.8-p1","probabilities":{"2.4.0":0.0025,"2.4.0-p1":0.0028,"2.4.1":0.0024,"2.4.1-p1":0.0028,"2.4.2":0.0025,"2.4.2-p1":0.0028,"2.4.2-p2":0.003,"2.4.3":0.0029,"2.4.3-p1":0.0033,"2.4.3-p2":0.0035,"2.4.3-p3":0.0029,"2.4.4":0.0028,"2.4.4-p1":0.003,"2.4.4-p10":0.0038,"2.4.4-p11":0.0036,"2.4.4-p12":0.004,"2.4.4-p13":0.0042,"2.4.4-p14":0.0043,"2.4.4-p15":0.0037,"2.4.4-p16":0.0034,"2.4.4-p17":0.0034,"2.4.4-p18":0.0031,"2.4.4-p2":0.0025,"2.4.4-p3":0.0027,"2.4.4-p4":0.0027,"2.4.4-p5":0.0031,"2.4.4-p6":0.0032,"2.4.4-p7":0.0035,"2.4.4-p8":0.0038,"2.4.4-p9":0.0031,"2.4.5":0.0028,"2.4.5-p1":0.0028,"2.4.5-p10":0.0029,"2.4.5-p11":0.0031,"2.4.5-p12":0.0043,"2.4.5-p13":0.0036,"2.4.5-p14":0.0036,"2.4.5-p15":0.0032,"2.4.5-p16":0.0032,"2.4.5-p17":0.003,"2.4.5-p2":0.0027,"2.4.5-p3":0.0029,"2.4.5-p4":0.0031,"2.4.5-p5":0.0034,"2.4.5-p6":0.0038,"2.4.5-p7":0.0034,"2.4.5-p8":0.0035,"2.4.5-p9":0.0028,"2.4.6":0.0041,"2.4.6-p1":0.0043,"2.4.6-p10":0.0044,"2.4.6-p11":0.0054,"2.4.6-p12":0.0052,"2.4.6-p13":0.0048,"2.4.6-p14":0.0052,"2.4.6-p15":0.0046,"2.4.6-p2":0.0032,"2.4.6-p3":0.0036,"2.4.6-p4":0.0048,"2.4.6-p5":0.0044,"2.4.6-p6":0.0042,"2.4.6-p7":0.0046,"2.4.6-p8":0.0045,"2.4.6-p9":0.0031,"2.4.7":0.0055,"2.4.7-p1":0.0066,"2.4.7-p10":0.0047,"2.4.7-p2":0.0039,"2.4.7-p3":0.005,"2.4.7-p4":0.0054,"2.4.7-p5":0.005,"2.4.7-p6":0.0055,"2.4.7-p7":0.0049,"2.4.7-p8":0.0046,"2.4.7-p9":0.0032,"2.4.8":0.0323,"2.4.8-p1":0.6111,"2.4.8-p2":0.0259,"2.4.8-p3":0.0154,"2.4.8-p4":0.0119,"2.4.8-p5":0.0117,"2.4.9":0.0093,"unspecified":0.0043},"confidence":0.3692},"backportWorthy":{"score":1.5704,"probabilities":{"0":0.0948,"1":0.24,"2":0.6652},"confidence":0.2636}},"curated":{"title":"Fixes the admin product alerts grid showing the wrong website","description":"In multi-website setups, the admin product alerts grid displays the customer's registered website for all alerts instead of the actual subscription website. The fix includes website_id and store_id from the product_alert_stock and product_alert_price tables in the collection SELECT clause.","categories":["Catalog/Product"],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":{"2.4.8-p5":{"before":"pass","after":"pass","adapted":false,"runAt":"2026-10-06T09:34:16.943Z","releaseCommit":"870a22c63d9d9b68fa3297962e2d5d5841115814","suites":{"integration":{"before":"pass","after":"pass","runAt":"2026-10-06T09:34:16.943Z"}}},"2.4.7-p10":{"before":"pass","after":"pass","adapted":false,"runAt":"2026-10-06T09:59:26.637Z","releaseCommit":"72561bf80652f57cc642a03e2c9a51d74a285b14","suites":{"integration":{"before":"pass","after":"pass","runAt":"2026-10-06T09:59:26.637Z"}}}}},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-40431 details"}