Skip to content

[Master] - Bug 647134: W2 2026 - Bug Bash I: Travel Request is conceptually wrong - #10350

Open
v-rohangarg20 wants to merge 1 commit into
mainfrom
features/647134-travel-request-conceptually-wrong
Open

[Master] - Bug 647134: W2 2026 - Bug Bash I: Travel Request is conceptually wrong#10350
v-rohangarg20 wants to merge 1 commit into
mainfrom
features/647134-travel-request-conceptually-wrong

Conversation

@v-rohangarg20

@v-rohangarg20 v-rohangarg20 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

AB#647134

Summary

Bug Bash I: Travel Request is conceptually wrong. Travel Request was built by extending the generic Spend Request pages, so there was no clear distinction between Spend Requests and Travel Requests in the UX, and travel/expense-management concepts leaked into the base pages. This PR gives Travel Request its own dedicated pages (reusing the Spend Request tables as a framework) and renames the Expense Agent's Spend Request concept to Travel Request.

Changes

Dedicated Travel Request pages (app) — built on the existing Spend Request tables:

  • New Travel Request Card (7104), Travel Request Subform (7105), and Travel Request List (7106).
  • Removed the Spend Request Card / Spend Request List page extensions so the base pages stay generic.

Rename Spend Request → Travel Request (Expense Agent app + tests):

  • App-owned fields: Spend Request No. / Spend Request CloseTravel Request No. / Travel Request Close on Expense Report Header/Line and Posted Expense Report Header/Line; Traveler."Spend Request No."Travel Request No..
  • App objects & files: Spend Requests APITravel Requests API, Spend Request Details APITravel Request Details API, tableextension Expense Spend RequestExpense Travel Request; folder Spend RequestTravel Request.
  • API entities/field controls, captions, tooltips, labels, and permission sets.
  • Expense Report navigation actions now open the Travel Request Card.
  • Renamed test codeunit Spend Request TestTravel Request Test and aligned the dependent error-assertion label.

BaseApp:

  • Spend Request.AssistEditNo() made public so the standalone Travel Request Card can invoke it.

Scope kept intentionally

  • Base references the app must resolve are unchanged: the Spend Request / Spend Request Detail tables, Release Spend Request codeunit, Microsoft.Finance.SpendRequest namespace, and the base Spend Request No. / Spend Request Close fields on Gen. Journal Line.
  • 0 errors / 0 warnings across the Expense Agent app and test projects.

…quest

Add dedicated Travel Request Card, Subform, and List pages built on the Spend Request tables, and remove the Spend Request page extensions so the base pages stay generic. Rename Spend Request to Travel Request across the Expense Agent app and tests (objects, fields, captions, APIs, permission sets). Make Spend Request.AssistEditNo public so the Travel Request Card can use it.
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction labels Aug 18, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Aug 18, 2026
@v-rohangarg20
v-rohangarg20 marked this pull request as ready for review August 18, 2026 11:48
@v-rohangarg20
v-rohangarg20 requested a review from a team August 18, 2026 11:48
@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Performance}$

Traveler.OnValidate loads the full Expense User record only to copy Name. Call SetLoadFields(Name) before Get so adding travelers does not read the rest of the Expense User columns unnecessarily.

                if Rec."Expense User No." <> '' then begin
                    CheckDuplicateTraveler();

                    ExpenseUser.SetLoadFields(Name);
                    if ExpenseUser.Get(Rec."Expense User No.") then
                        Rec."Expense User Name" := ExpenseUser.Name;
                end;

Knowledge:

Posting this finding as an issue comment because inline comment placement failed.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Telemetry}$

The new top-level Travel Requests API create surface (DelayedInsert = true) does not emit any usage-reporting telemetry on successful insert, unlike the existing Expenses API and Expense Reports API OnInsertRecord paths. Add a dedicated Session.LogMessage after successful creation, with a new stable event ID and the existing category pattern, so travel-request creation is observable in the same telemetry stream.

Posting this finding as an issue comment because inline comment placement failed.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟠\ High\ Severity\ —\ Testing}$

The new confirm-handler pattern hardcodes replies through shared globals instead of consuming queued expectations and proving which dialog fired. Tests that use SpendReqConfirmHandler can therefore accept the wrong confirm path without asserting the expected interaction contract, which is exactly the headless-UI anti-pattern this rule warns about.

Knowledge:

Posting this finding as an issue comment because inline comment placement failed.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4

Comment thread src/Apps/W1/ExpenseAgent/app/src/APIs/TravelRequestsAPI.Page.al
Comment thread src/Apps/W1/ExpenseAgent/test/src/TravelRequestTest.Codeunit.al
Comment thread src/Apps/W1/ExpenseAgent/app/src/APIs/TravelRequestsAPI.Page.al
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 Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants