{"data":{"id":"magento2-40540","source":"github-pr","sourceRef":"magento/magento2#40540","title":"Data Type of applied_rule_ids in Quote and Quote Item is different","pr":{"number":40540,"url":"https://github.com/magento/magento2/pull/40540","author":"lbajsarowicz","mergedAt":"2026-06-08T10:42:29Z","mergeCommit":"54a240ea19fae7f69538111e1fea6e165421afa3","headCommit":"f578c1b7b9ea965cd014fd399aca5e4b3cce5819","baseRef":"2.4-develop","diffSha256":"d9acc5836f277c8fe034e586967171d2f1e6d2210b30c25307ead4e45ad29224"},"issues":[{"number":39838,"url":"https://github.com/magento/magento2/issues/39838","title":"Data Type of applied_rule_ids in Quote and Quote Item is different","labels":["Area: Catalog","Component: Quote","Issue: Confirmed","Priority: P3","Progress: PR Created","Progress: done","Reported on 2.4.8","Reproduced on 2.4.x","Triage: Dev.Experience"],"kind":"human"}],"fixedIn":null,"containingTags":[],"reportedOn":"2.4.8","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":"clean"},"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","2.4.9"],"components":["magento/module-quote"],"files":[{"path":"app/code/Magento/Quote/etc/db_schema.xml","change":"modified","package":"magento/module-quote"}],"stripped":{"tests":[],"docs":[],"outsideCode":[]},"linesChanged":2,"mergeBatched":false,"excluded":null,"sections":{"description":"- Data type of Quote Item applied_rule_ids column is inconsistent compare to applied_rule_ids in quote table","stepsToReproduce":"- Just check the db_schema.xml in Quote module","expectedResult":"- Data type should be consistent across parent and child tables","actualResult":"- Data type of Quote Item applied_rule_ids column is inconsistent compare to applied_rule_ids in quote table","source":"issue"},"signatures":[],"labels":{"area":["Catalog"],"component":["Quote"],"priority":"P3","severity":null,"reportedOn":["2.4.8"]},"categories":["Shopping Cart"],"triage":{"model":"@cf/cloudflare/clef","requestHash":"dda46cd78bbca0ea2a7e3e1a709a26ef90a85ad1e76d1c2425552fd5f4191634","isBugfix":0.9606,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9234,"feature":0.0084,"refactor":0.0462,"tests_only":0.0087,"docs_only":0.0065,"dependency":0.0068},"confidence":0.826},"scope":{"score":0.1696,"probabilities":{"0":0.8646,"1":0.1012,"2":0.0342},"confidence":0.6384},"risk":{"score":1.6735,"probabilities":{"0":0.1289,"1":0.0687,"2":0.8024},"confidence":0.4977},"area":{"choice":"checkout","probabilities":{"catalog":0.0294,"checkout":0.865,"customer":0.0125,"admin":0.0194,"graphql_api":0.0085,"framework":0.0185,"frontend":0.0111,"other":0.0356},"confidence":0.7159},"securityRelevant":0.0066,"reportedVersion":{"choice":"2.4.8","probabilities":{"2.4.0":0.0026,"2.4.0-p1":0.0024,"2.4.1":0.0023,"2.4.1-p1":0.0023,"2.4.2":0.0026,"2.4.2-p1":0.0027,"2.4.2-p2":0.0031,"2.4.3":0.0034,"2.4.3-p1":0.0036,"2.4.3-p2":0.0034,"2.4.3-p3":0.0033,"2.4.4":0.0036,"2.4.4-p1":0.0031,"2.4.4-p10":0.003,"2.4.4-p11":0.0041,"2.4.4-p12":0.0039,"2.4.4-p13":0.0035,"2.4.4-p14":0.0045,"2.4.4-p15":0.0037,"2.4.4-p16":0.0037,"2.4.4-p17":0.0032,"2.4.4-p18":0.0038,"2.4.4-p2":0.0025,"2.4.4-p3":0.0024,"2.4.4-p4":0.0031,"2.4.4-p5":0.0034,"2.4.4-p6":0.0041,"2.4.4-p7":0.0035,"2.4.4-p8":0.0062,"2.4.4-p9":0.0033,"2.4.5":0.0048,"2.4.5-p1":0.0029,"2.4.5-p10":0.0027,"2.4.5-p11":0.004,"2.4.5-p12":0.006,"2.4.5-p13":0.0052,"2.4.5-p14":0.0044,"2.4.5-p15":0.0039,"2.4.5-p16":0.0042,"2.4.5-p17":0.0037,"2.4.5-p2":0.0029,"2.4.5-p3":0.003,"2.4.5-p4":0.0037,"2.4.5-p5":0.0042,"2.4.5-p6":0.0041,"2.4.5-p7":0.004,"2.4.5-p8":0.0044,"2.4.5-p9":0.0029,"2.4.6":0.0081,"2.4.6-p1":0.0054,"2.4.6-p10":0.0058,"2.4.6-p11":0.0076,"2.4.6-p12":0.007,"2.4.6-p13":0.0083,"2.4.6-p14":0.0079,"2.4.6-p15":0.0069,"2.4.6-p2":0.0036,"2.4.6-p3":0.0043,"2.4.6-p4":0.0071,"2.4.6-p5":0.0053,"2.4.6-p6":0.0077,"2.4.6-p7":0.0064,"2.4.6-p8":0.0073,"2.4.6-p9":0.0037,"2.4.7":0.0613,"2.4.7-p1":0.0113,"2.4.7-p10":0.0123,"2.4.7-p2":0.0063,"2.4.7-p3":0.0076,"2.4.7-p4":0.0089,"2.4.7-p5":0.0095,"2.4.7-p6":0.0135,"2.4.7-p7":0.014,"2.4.7-p8":0.0198,"2.4.7-p9":0.0103,"2.4.8":0.3581,"2.4.8-p1":0.032,"2.4.8-p2":0.0402,"2.4.8-p3":0.0234,"2.4.8-p4":0.0217,"2.4.8-p5":0.0205,"2.4.9":0.0057,"unspecified":0.0499},"confidence":0.1309},"backportWorthy":{"score":1.2516,"probabilities":{"0":0.1793,"1":0.3898,"2":0.4309},"confidence":0.0546}},"curated":{"title":"Fixes truncated applied_rule_ids in the quote table when many sales rules apply","description":"The applied_rule_ids column in the quote table was VARCHAR(255), while quote_item and quote_address_item define it as TEXT. With 100+ sales rules applied to a single item, the list of rule IDs can exceed 255 characters, causing data truncation and mismatches. The fix changes quote.applied_rule_ids to TEXT.","categories":["Shopping Cart"],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-40540 details"}