[Master] - [Slice 639548] - Consolidate 17 country Expense Agent Demo Data into single W1 app - #10539
Conversation
…Bug646163-consolidate-country-demo-data-apps-into-one-app
Rename per-country demo data codeunits to Create/Update/Expense naming convention with country-code suffix, organize files into Setup Data/Master Data/Transactions/Historical subfolders, and update object references and variable names accordingly.
…idate-country-demo-data-apps-into-one-app # Conflicts: # build/projects/Apps AT/.AL-Go/settings.json # build/projects/Apps AU/.AL-Go/settings.json # build/projects/Apps CA/.AL-Go/settings.json # build/projects/Apps DE/.AL-Go/settings.json # build/projects/Apps DK/.AL-Go/settings.json # build/projects/Apps ES/.AL-Go/settings.json # build/projects/Apps FR/.AL-Go/settings.json # build/projects/Apps GB/.AL-Go/settings.json # build/projects/Apps NZ/.AL-Go/settings.json # build/projects/Apps US/.AL-Go/settings.json
…Bug646163-consolidate-country-demo-data-apps-into-one-app # Conflicts: # build/projects.json
Per-country demo data (GL accounts, posting/employee groups, categories, subcategories, rules, transactions, historical) for the 7 new countries, and register them in build/projects.json and per-country AL-Go settings. Restrict FindGLAccountByName to Posting accounts to avoid Begin-Total name collisions. Set the CZ Employee Posting Group Payables Account when the localized chart leaves it blank. Ignore the mandatory journal template name check when posting expense reports.
…res/Slice-639548-Demo-data-for-new-countries-(October) # Conflicts: # build/projects/Apps CH/.AL-Go/settings.json
Bound Justification, Payment Method Code, Starting Point and Ending Point assignments with CopyStr to the target Expense field lengths (Text[100], Code[10], Text[50]). These pre-existing overflows surfaced as new warnings when the demo data began building for the newly added countries.
Replace the CopyStr bounding with correctly sized parameters (Justification Text[100], Payment Method Code Code[10], Starting/Ending Point Text[50]) to clear the AA0139 overflow warnings surfaced by building the demo data for the new countries.
Move per-country GL account/category resolution into the W1 Create Expense GL Account codeunit with country-aware name/search/fallback logic; retire per-country Expense Agent apps from build groups/projects/AL-Go settings and app.json internalsVisibleTo. Fix country account mappings surfaced during testing (DK prepayment 26400, DK other 05699, AT bank/card/travel/rounding names, NZ prepayment 2510, FR bank 512100, FR travel 625100, plus new-country fallbacks).
| using Microsoft.Finance.GeneralLedger.Account; | ||
| using Microsoft.Foundation.Enums; | ||
|
|
||
| codeunit 8325 "Create Exp. GL Account AT" |
There was a problem hiding this comment.
I think we should not duplicate same codeunits for each country but have standard structure for W1 and small adjustments for some countries. I expected to see single codeunit "Create Expense G/L Account" with some case statement for "per country" things instead of having 20 copies per each country which are very similar. This is not a consolidation but aggregation of several extension objects into one app. Maintenance of such design will require changes in 20+ places for every common change for all countries. Can we build common structure like for AT, but
Agentic PR Review - Round 1Recommendation: Accept with SuggestionsWhat this PR doesThis is a Slice (AB#639548). It consolidates the 17 per-country The account-resolution design is sound. Each account resolver first calls SuggestionsS1 - Journal template check now bypassed for all expense posting S2 - ES path skips G/L account indentation S3 - No automated test for the new country resolution S4 - Check the "Subsitence" spelling Risk assessment and necessityRisk: The change is large (100 files) but the bulk is additive demo-data codeunits and build-registration removals, both low blast radius. The two behavior changes in product code are the S1 posting-check bypass (affects every expense post, not just demo) and the S2 ES indentation branch. The retirement of per-country apps from Necessity: Justified. Collapsing 17 country apps into one W1 app removes heavy duplication and is the right channel for a Slice. The scope is appropriate for a consolidation, and the additive demo data plus country map is a reasonable way to keep per-country behavior. No High-confidence blocker was found, so this is Accept with Suggestions.
|
CreateGLAccount ran GLAccountIndent.Indent() for any non-ES company, including uninitialized/test companies with no Country/Region Code (e.g. 'My Company'). In a localized container (ES) the localized G/L Account-Indent rejects the W1 default expense accounts (e.g. 10390) with 'Missing group', failing the PreviewPostingOfExpenseReportWhenDemoDataIsExecuted test. Only re-indent when a country code is set.
|
This PR marks the country-specific Knowledge: Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.35.4 |
Agentic PR Review - Round 2Recommendation: Request ChangesWhat this PR doesThis is round 2 for Slice AB#639548. The new commit since round 1 only changes The prior suggestions are not fixed by that change. The unconditional journal template bypass is still present, the ES branch still skips Status of previous suggestions
New observationsS5 - Retired country apps skip obsolete staging Risk assessment and necessityRisk: The new round-2 code change is small, but it does not resolve the earlier ES indentation concern. The larger current-head risk is upgrade compatibility: removing the retired country apps from build registration can stop existing installed preview apps from receiving the staged obsolete package. App build checks are mostly green or still running, but green builds do not prove the upgrade path is safe. Necessity: The W1 consolidation is still justified and is the right direction for this Slice. The scope is reasonable, but the country app retirement needs a safe staging plan before merge. After that is fixed, the remaining prior suggestions are non-blocking.
|
Work item: AB#639548
What
Consolidate the per-country Expense Agent setup logic (17 countries) into the single W1
Expense Agent (Preview)app.Changes
Create Expense GL Account/Create Expense Categoriescodeunits using country-aware name/search/fallback logic (keyed off Company Information Country/Region Code).ExpenseAgent_<CC>apps from build registrations (build/groups.json,build/projects.json, eachbuild/projects/Apps <CC>/.AL-Go/settings.json) and fromapp.jsoninternalsVisibleTo; empty the per-country event subscribers.Account-mapping fixes found during per-country UI testing
26400(was resolving to17400); other-refundable05699.2800, card2830, travel7310, rounding8070names.2510.512100(was164100); travel refundable625100(was625110).Testing
Verified per country by running each localized web client and checking the Employee/Expense Posting Groups.
Create Expense GL Accountcompiles clean.