{"data":{"id":"magento2-30479","source":"github-pr","sourceRef":"magento/magento2#30479","title":"fix undefined method isAllowedForRuleCondition","pr":{"number":30479,"url":"https://github.com/magento/magento2/pull/30479","author":"yaroslav-zenin","mergedAt":"2025-08-19T23:02:42Z","mergeCommit":"5e3ef316520293bfa1696b6cf0020fb014d5e11a","headCommit":"5cd6c95cb3bc50d4e28afb4909971a7bf792ed72","baseRef":"2.4-develop","diffSha256":"3442d06405f85c04507161d6a2920404ab55f92582b969327d5104a95fe5c066"},"issues":[],"fixedIn":"2.4.9","containingTags":["2.4.9"],"reportedOn":null,"codeMatch":{"2.4.6":"conflict","2.4.6-p1":"conflict","2.4.6-p2":"conflict","2.4.6-p3":"conflict","2.4.6-p4":"conflict","2.4.6-p5":"conflict","2.4.6-p6":"conflict","2.4.6-p7":"conflict","2.4.6-p8":"conflict","2.4.6-p9":"conflict","2.4.6-p10":"conflict","2.4.6-p11":"conflict","2.4.6-p12":"conflict","2.4.6-p13":"conflict","2.4.6-p14":"conflict","2.4.6-p15":"conflict","2.4.7":"conflict","2.4.7-p1":"conflict","2.4.7-p2":"conflict","2.4.7-p3":"conflict","2.4.7-p4":"conflict","2.4.7-p5":"conflict","2.4.7-p6":"conflict","2.4.7-p7":"conflict","2.4.7-p8":"conflict","2.4.7-p9":"conflict","2.4.7-p10":"conflict","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.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5"],"components":["magento/module-sales-rule"],"files":[{"path":"app/code/Magento/SalesRule/Model/Rule/Condition/Product.php","change":"modified","package":"magento/module-sales-rule"}],"stripped":{"tests":["app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/ProductTest.php"],"docs":[],"outsideCode":[]},"linesChanged":7,"mergeBatched":false,"excluded":null,"sections":{"description":"sometimes in method `\\Magento\\SalesRule\\Model\\Rule\\Condition\\Product::loadAttributeOptions` we got \n`\\Magento\\Catalog\\Model\\ResourceModel\\Eav\\Attribute` model instead of `\\Magento\\Catalog\\Model\\ResourceModel\\Eav\\Attribute`. This is not a permanent issue just happen sometimes and very difficult to reproduce. \nThis pull request just change condition order but this is enough to check if method present in resource model, so regular model will be skipped.","stepsToReproduce":null,"expectedResult":null,"actualResult":null,"source":"pr"},"signatures":[],"labels":{"area":[],"component":[],"priority":null,"severity":null,"reportedOn":[]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"c91fac793500830e8785093e40be14af120b678c7f2386b24b02ecc5a3de0130","isBugfix":0.9086,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.8042,"feature":0.008,"refactor":0.1255,"tests_only":0.0188,"docs_only":0.0056,"dependency":0.0054,"cleanup":0.0325},"confidence":0.6081},"scope":{"score":0.716,"probabilities":{"0":0.4056,"1":0.4727,"2":0.1217},"confidence":0.1042},"risk":{"score":0.5549,"probabilities":{"0":0.6503,"1":0.1445,"2":0.2052},"confidence":0.2288},"area":{"choice":"catalog","probabilities":{"catalog":0.3894,"checkout":0.2597,"customer":0.0111,"admin":0.1273,"graphql_api":0.0098,"framework":0.0517,"frontend":0.0152,"other":0.1358},"confidence":0.1507},"securityRelevant":0.0084,"reportedVersion":{"choice":"unspecified","probabilities":{"2.4.0":0.0044,"2.4.0-p1":0.005,"2.4.1":0.0073,"2.4.1-p1":0.007,"2.4.2":0.0093,"2.4.2-p1":0.009,"2.4.2-p2":0.0091,"2.4.3":0.0156,"2.4.3-p1":0.0142,"2.4.3-p2":0.0157,"2.4.3-p3":0.01,"2.4.4":0.0214,"2.4.4-p1":0.0124,"2.4.4-p10":0.0078,"2.4.4-p11":0.012,"2.4.4-p12":0.0086,"2.4.4-p13":0.0089,"2.4.4-p14":0.0096,"2.4.4-p15":0.0077,"2.4.4-p16":0.0082,"2.4.4-p17":0.0075,"2.4.4-p18":0.0061,"2.4.4-p2":0.0035,"2.4.4-p3":0.0041,"2.4.4-p4":0.0044,"2.4.4-p5":0.0051,"2.4.4-p6":0.0055,"2.4.4-p7":0.0049,"2.4.4-p8":0.0051,"2.4.4-p9":0.0047,"2.4.5":0.0164,"2.4.5-p1":0.0117,"2.4.5-p10":0.0085,"2.4.5-p11":0.0108,"2.4.5-p12":0.0088,"2.4.5-p13":0.0092,"2.4.5-p14":0.0078,"2.4.5-p15":0.008,"2.4.5-p16":0.0074,"2.4.5-p17":0.0077,"2.4.5-p2":0.0042,"2.4.5-p3":0.0065,"2.4.5-p4":0.0072,"2.4.5-p5":0.0059,"2.4.5-p6":0.0074,"2.4.5-p7":0.0062,"2.4.5-p8":0.0055,"2.4.5-p9":0.0046,"2.4.6":0.0286,"2.4.6-p1":0.0168,"2.4.6-p10":0.0103,"2.4.6-p11":0.0127,"2.4.6-p12":0.0093,"2.4.6-p13":0.0102,"2.4.6-p14":0.0092,"2.4.6-p15":0.0086,"2.4.6-p2":0.0048,"2.4.6-p3":0.008,"2.4.6-p4":0.0089,"2.4.6-p5":0.0094,"2.4.6-p6":0.0086,"2.4.6-p7":0.0074,"2.4.6-p8":0.006,"2.4.6-p9":0.0059,"2.4.7":0.0141,"2.4.7-p1":0.0128,"2.4.7-p10":0.0086,"2.4.7-p2":0.0077,"2.4.7-p3":0.0119,"2.4.7-p4":0.0144,"2.4.7-p5":0.0123,"2.4.7-p6":0.0127,"2.4.7-p7":0.0109,"2.4.7-p8":0.0072,"2.4.7-p9":0.0062,"2.4.8":0.0147,"2.4.8-p1":0.0126,"2.4.8-p2":0.0147,"2.4.8-p3":0.0144,"2.4.8-p4":0.0132,"2.4.8-p5":0.014,"2.4.9":0.0163,"unspecified":0.2187},"confidence":0.0452},"backportWorthy":{"score":1.3593,"probabilities":{"0":0.1415,"1":0.3577,"2":0.5008},"confidence":0.0982}},"curated":{"title":"Sales rule conditions sometimes hit undefined method isAllowedForRuleCondition","description":"In the SalesRule Product condition, loadAttributeOptions sometimes gets a regular model instead of the resource model, so isAllowedForRuleCondition is an undefined method. The issue is not permanent and very difficult to reproduce. Product.php now changes the condition order so getDataUsingMethod runs first and the regular model will be skipped.","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-07","reviewedBy":null},"tests":{"2.4.8-p5":{"before":"fail","after":"pass","adapted":false,"runAt":"2026-10-07T15:09:29.205Z","releaseCommit":"870a22c63d9d9b68fa3297962e2d5d5841115814","suites":{"unit":{"before":"fail","after":"pass","runAt":"2026-10-07T15:09:29.205Z"}}}}},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-30479 details"}