Repository navigation
fix(revenue): a product with no code is titled by its name, and the read trigger never touches an untitled product (#2168) - #2171
Merged
Conversation
…ead trigger never touches an untitled product (#2168) Measured on staging os-05ayzz after upgrading to 5.1.1: four products created before the product_code autonumber (2026-07-06) hold no code, so display_title (`product_code + " - " + name`) evaluated to nothing. product_title_mirror had no title to stamp, their 28 lines stayed untitled, and line_item_product_title_backfill re-saved those products on every read of their lines (updated_at moved on each list view). - display_title falls back to the name when product_code is empty. - The read trigger skips a product whose display_title is empty. Co-authored-by: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Oct 19, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2168 (follow-up to #2169)
Clause-②: no
What 5.1.1 showed on staging
Measured on
os-05ayzzafter upgrading 5.0.0 → 5.1.1, with no manual step at all:Four products never moved: ObjectStack Platform (15 lines), Premium Support (7), Implementation Services (5) and Cloud Hosting (Annual) (1).
product_codeautonumber, soproduct_codeis empty.display_titleisproduct_code + " - " + name, so it evaluated to nothing.product_title_mirrorreturns when the title is empty, so their 28 lines can never be titled, and the products' own record titles were empty too.Worse,
line_item_product_title_backfillre-saved those products on every read of their lines. Theirupdated_atmoved at 02:30:16, 02:30:29 and 02:30:32 on one list view.The fix
display_titlefalls back tonamewhenproduct_codeis empty. This is the app's own formula, for rows older than the autonumber, in thehas(...) && ... != nullformopportunity.object.tsalready uses.display_titleand skips a product whose title is empty, so no product is ever written on a read that cannot title anything.Tests
test/line-item-product-title.test.ts, three new cases on the real engine:display_titleis its name;test/product-title-mirror-pass.test.ts, one new case: the read trigger never touches a product whose title is empty. The fake store now carriesdisplay_title.Ablations, each run and then restored:
Release
This ships as 5.1.2, and 5.1.2 goes to production in place of 5.1.1. 5.1.1 is on the staging marketplace only, and a version number cannot be re-published.
🤖 Generated with Claude Code