Skip to content

[Spend Request tests] Verify indirect updates and header totals - #11454

Draft
Prangshuman Das (t-prda) wants to merge 19 commits into
features/646383-expense-approver-filterfrom
features/646383-expense-header-amount
Draft

Prangshuman Das (t-prda) wants to merge 19 commits into
features/646383-expense-approver-filterfrom
features/646383-expense-header-amount

Conversation

@t-prda

@t-prda Prangshuman Das (t-prda) commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Scope

AB#646383

Indirect-update regression layer above #11453 in native stack #11893.

The production permission fix is now upstream. Retain main's Spend Request table permission and AddToTotalExpectedAmount implementation unchanged. The previously proposed helper codeunit/delegation has been removed as redundant.

This PR now changes only tests, a test-only permission set and two exclusion entries:

  • Re-enable D365BasicCanUpdateTravelRequestDetailsIndirectly and ExpenseAgentCanUpdateTravelRequestDetailsIndirectly.
  • Verify successive page updates apply each amount delta once, without granting direct writes.
  • Verify callers without header Modify permission are denied and Released status is preserved.
  • Verify real detail deletion updates header totals exactly once.

All upstream Entra tests/helpers are retained. No production role changes, SUPER workaround, table-permission rollback or weakened assertions are introduced. Incorrect AI-feature labels were removed.

Validation

Exact parent ancestry, file scope, whitespace and exclusion ownership checks pass. This layer's added/removed source lines are unchanged relative to its refreshed parent. Upstream changes are inherited through the main merge, not reverted. The final exact-head cumulative artifact evidence below validates the current implementation; older evidence remains historical. Existing excluded PDF, IN/RU gaps and tolerated-native distinctions remain; no absent/excluded case is claimed passing.

Current checkpoint

Head da6d82d6c8cf7c64bbd7355ca0acab28f0d5e28a, tree 47dd9e6aa7998a3268d1fea029285e4c75299e53.

Merged main baseline remains 0a602a2481c93ebfe7b1d27d6016fb9926c42111 (permission cleanup from PR 11561). No additional main merge or code changes were made during finalization. Old b195c7a/4eef8ac tree-equality claims remain obsolete after the intentional baseline/auth changes.

Verified AL compile/publish/test run 36162564729 succeeded, attempt 2, at exact validation head da6d82d6c8cf7c64bbd7355ca0acab28f0d5e28a. 113/113 test jobs and 113/113 cleanup steps succeeded. 113/113 credential-removal steps also succeeded.

W1 artifacts verify 11 auth/URL methods + 876 re-enabled API methods + the single CU139496 HTTP scenario, plus 59 owned methods (47 API, 12 Expense), 22 permission methods, 74 SpendRequest methods (9 excluded), and 31 BaseApp methods.

Local Pester at the applicable checkpoint: 106 passed, zero failed/skipped. PowerShell run 36162564206 succeeded, attempt 2. Its earlier analyzer timeout was superseded by the single authorized successful retry; this is not a claim that the timed-out attempt passed.

Validation limits

For uptake/full, CU139496 MicrosoftAuthenticationRespectsServerAuthMode is verified in the actual UserPassword fixture (401/200/401). The Windows 200/200/200 expectations are implemented but Windows runtime remains unverified; no foreign local NST was used. Successful GitHub runs do not establish universal native NAV coverage. Excluded PDF cases, country-specific absent/excluded cases and tolerated-native distinctions are not claimed passing. No PR has been merged or auto-merged; validation drafts remain Do Not Merge outside stack #11893.

Targeted country evidence

Final full-stack artifacts at da6d82d6c8cf7c64bbd7355ca0acab28f0d5e28a verify IT 3/3 (Italian discount1 + quote dates2), CZ 14/14 (journal numbering2 + VAT12), AU 22/22 (cancellation10 + VAT12). Each listed method passed exactly once in its country artifact from run36162564729. These are targeted country checks, not a claim about excluded PDF/native cases or Windows authentication.

Delegate only Validate-plus-Modify to internal codeunit6841 with Spend Request Modify permission. Preserve caller indirect rights, zero-delta behavior and status guards without broad table self-permission or new production grants. Cover successive page updates, absent header Modify permission, Released status and real detail-deletion deltas. Re-enable the two owned permission regressions; compile/runtime validation pending CI.

AB#646383

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
…ring

Resolve the exclusion manifest as the parent list minus only the two header-update methods owned by this layer. All22 original Expense exclusions remain.

AB#646383

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Match the observed IndirectModify denial and verify persisted initial amounts before restricting permissions. Refresh the header before setting Released so the fixture does not overwrite the detail-triggered total.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@AndersLarsenMicrosoft Anders (AndersLarsenMicrosoft) added SCM GitHub request for SCM area and removed Team: Finance GitHub request for Finance area labels Sep 17, 2026
@github-actions github-actions Bot added the Team: Finance GitHub request for Finance area label Sep 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@t-prda
Prangshuman Das (t-prda) removed this pull request from stack #11232 September 24, 2026 15:27
@t-prda
Prangshuman Das (t-prda) added this pull request to stack #11863 September 24, 2026 15:27
@t-prda Prangshuman Das (t-prda) changed the title [Spend Requests] Honor indirect rights when updating header totals [Spend Request tests] Verify indirect updates and header totals Sep 24, 2026
…ructure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@github-actions

Copy link
Copy Markdown
Contributor

Issue #11561 is not valid. Please make sure you link an issue that exists, is open and is approved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91

This branch was successfully deployed

1 active (outdated) deployment
triage — cfcf9b59 Deployed Sep 17, 2026 by AndersLarsenMicrosoft via Classify team ownership #5044
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 SCM GitHub request for SCM area Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants