Repository navigation
[Bug][Subscription Billing] 67 Subscription Billing tests are disabled in CI on every localization without a tracked reason - #13072
Conversation
…sts and refresh Contract Renewal Selection after opening the Subscription The Subscription Billing DisabledTests list (67 entries, 66 without a bug reference) is removed, so all Subscription Billing tests run in CI again. TestIfContractRenewalSelectionIsUpdateOnAfterValidateCalcBasePercentage failed because of a real regression: since microsoft#10276 the Contract Renewal Selection page loads a line into its buffer only once. Changes made on the Subscription opened from the page were not shown, and a Renewal Term changed there was overwritten with the stale buffer value when the page was closed. The page now reloads the buffered lines of that Subscription after the card closes and keeps only the Renewal Terms entered on the page itself. Tests that only passed by accident are made independent of the environment: - CheckDisallowChangesToContractRenewalQuote and DisallowSalesQuoteToInvoiceForContractRenewal now build a real Contract Renewal Quote and assert the expected error. - ExpectErrorOnChangeEndUserIfServiceObjectIsLinkedToContract asserts the expected error for a Subscription linked to a contract. - The two price update proposal tests set up the price calculation handler they depend on. Fixes microsoft#12498 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThis change re-enables the full Subscription Billing test set, makes several tests independent of environment defaults, and fixes stale values on the Contract Renewal Selection page after a Subscription is opened. The deleted disabled-test list makes the scenarios run again. The page refresh reloads the changed Subscription Lines while preserving Renewal Terms entered on the selection page, and the new tests cover both the refreshed calculation value and the two Renewal Term paths. The refresh is correct for the built-in fields, but it bypasses the extension hooks that can add values to the temporary buffer. Problem-solution fitFit: Strong The change directly restores the missing CI coverage and addresses the stale page-buffer regression exposed by those tests. The product change is limited to the affected page, while the remaining edits make existing tests assert the intended behavior. SuggestionsS1 (🔴 High): Preserve extension values during buffer refresh Risk assessment and necessityRisk: Re-enabling the suite can expose localization-specific failures, so the country jobs, especially the known IT-sensitive deferral scenario, should be green before merge. The product change is narrow, but the new full-record refresh can break extensions that populate the temporary Subscription Line buffer through the page's integration events. Necessity: Restoring these tests is important because skipped scenarios can hide regressions across contract renewal, deferrals, and billing. Refreshing the page after editing a Subscription is also needed so users do not continue with stale line values; preserving the existing extension contract keeps that fix safe.
|
… Renewal Selection After the Subscription is opened from the Contract Renewal Selection page, the buffered lines were refreshed with TransferFields, which also overwrote values that subscribers set in the buffer through OnAfterInitTempSubscriptionLine or OnValidateRenewalTermOnBeforeCurrPageUpdate. Those values were then lost or transferred back incorrectly on closing. The refresh now takes a field from the Subscription Line only when the buffer still held the value stored before the Subscription was opened. Values that differ only on the page, such as an entered Renewal Term or a value set by a subscriber, are kept and written on closing as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, S1 is addressed in 6f7561a. The refresh after the Subscription is opened no longer uses New test The full Subscription Billing suite is green on W1. |
Good Sense Reviewer - Round 2Recommendation: AcceptWhat this PR doesThe new commit replaces the blanket buffer refresh with a field-level three-way merge. Database changes refresh fields that the page has not changed, while page-only and subscriber-provided values remain intact. Status of previous suggestions
New observations (commits since round 1)None - the new implementation preserves page-only values while refreshing card changes, and the changed paths have focused coverage. Risk assessment and necessityRisk: The reflection-based refresh covers normal base and extension fields and excludes FlowFields, system fields, Blob, and Media fields. Quantity is recalculated explicitly, and no new correctness issue was found. Necessity: The change restores useful CI coverage and prevents stale Contract Renewal Selection values without overwriting extension-provided page values.
|
What & why
67 Subscription Billing tests were switched off in CI on every localization through
src/DisabledTests/Subscription_Billing_Test/Subscription Billing Test.DisabledTest.json. Skipped tests are not shown in the CI log, so a pull request that broke one of these scenarios still got a green build. 66 of the 67 entries had no bug reference.This PR deletes the DisabledTests file for the Subscription Billing test app, so all 67 tests run in CI again.
Re-enabling the tests exposed one product regression and a few tests that only passed by accident:
Contract Renewal Selection: [master] Renewal Term field on the Create Contract Renewal Quote page does not accept the entered value such as 12M #10276 introduced a regression. After the user opened the Subscription from a contract line (Service Object Description,Service Object No.or the drill-down), the page kept showing the old buffered Subscription Line values. It now reloads the buffered lines after the Subscription is closed. Only theRenewal Termvalues the user typed on the page are kept, because the page writes them to the Subscription Lines only on closing. This is done in the new local procedureOpenServiceObjectAndRefreshLines.Linked work
Fixes #12498
How I validated this
What I tested and the outcome
RenewalTermEnteredOnPageIsRetainedAfterSubscriptionIsOpened: theRenewal Termtyped on the page is kept after the Subscription is opened, and theCalculation Base %changed on the Subscription is shown.RenewalTermChangedOnSubscriptionIsShownOnPage: aRenewal Termchanged on the Subscription is shown on the page.TestIfContractRenewalSelectionIsUpdateOnAfterValidateCalcBasePercentage) passes too.CurrPage.Update(false). ATestPagere-reads the current record after the action, so no test can observe the missing refresh.Contract Renewal Test:CheckDisallowChangesToContractRenewalQuotenow asserts the expected error and coversSell-to Customer No.through the page. The check only runs for changes made on the page.DisallowSalesQuoteToInvoiceForContractRenewalnow asserts the expected error and usesConfirmHandler.CreateFakeContractRenewalQuotenow creates theSales Subscription Linewith Process "Contract Renewal" that makes the quote a Contract Renewal Quote.Contract Price Proposal Test:CreateVendorGLAccountPriceUpdateProposalRecentItemPricesandCreateCustomerPriceUpdateProposalUsesPriceOfSubscriptionUnitOfMeasurenow enable extended price calculation and set the default handler to "Business Central (Version 16.0)".Service Object Test:ExpectErrorOnChangeEndUserIfServiceObjectIsLinkedToContractnow links the Subscription to a contract, uses a customer with its own price group, and asserts the error.Risk & compatibility
DeferralsReleaseSucceedsWhenGLAccountHasDefaultDeferralTemplateAndJournalTemplNotMandatorywas the only entry with a bug reference (641478, failing on IT). It passes on W1 but may still fail on IT. Please expect this one possibly failing in the IT job.Renewal Termvalues are still kept. There is no data or upgrade impact, and no permission or telemetry change.🤖 Generated with Claude Code