[29.0] - Bug 650480:[Expense Agent] Closed travel requests are editable and are missing approver info - #11594
Conversation
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThis change makes travel-request fields editable only while the request is open, stores the selected expense user's name, and records readable approval audit details. The status checks and audit-field updates follow the existing Spend Request flow, but the new unused page variable causes every Apps build to fail. The stored requested-for name can also be edited independently or remain blank on existing records. Problem-solution fitFit: Partial The change addresses the requested editing and audit-name behavior, but the implementation does not currently build and does not keep the new derived name reliable in all record states. SuggestionsS1 (🔴 High): Remove the unused open-state variable S2 (🟠 Moderate): Populate names for existing requests S3 (🟠 Moderate): Keep the derived name read-only S4 (🟠 Moderate): Add regression coverage for changed behavior Risk assessment and necessityRisk: The page change currently fails the enforced warning policy in every Apps build. After that is fixed, the stored requested-for name can become inconsistent through direct editing or remain blank on existing records. The approval audit changes are narrow and use the established User lookup pattern; no event-publisher dependency is involved. Necessity: The editing restrictions and approval audit updates are useful and appropriately scoped. The build failure must be fixed before merge, while name synchronization, upgrade behavior, and regression coverage should be completed to avoid inconsistent travel-request data.
|
Allow editing the approver on Travel Request cards and preserve the approver update behavior across the Expense Agent and Spend Request objects. (cherry picked from commit abe7b2a)
ab35d6a to
ec51e0b
Compare
Good Sense Reviewer - Round 2Recommendation: Accept with SuggestionsWhat this PR doesThis update removes the unused page state that caused the first-round build blocker while keeping the travel-request editability, requested-for name, and disabled-agent auto-approval changes. The build failure noted earlier is addressed, but existing records can still keep a blank derived name, the derived name is still editable, and there is no focused regression coverage. Problem-solution fitFit: Partial The change addresses the build blocker and keeps the main behavior changes. The fit remains partial because existing requests and direct edits can still leave the stored requested-for name inconsistent with the selected expense user. Status of previous suggestions
New observations (commits since round 1)None - the latest change only removes the unused page state from the first review. Risk assessment and necessityRisk: The enforced-warning build risk from the unused page state is gone. The remaining risk is inconsistent requested-for name data on existing or manually edited requests, plus weak coverage for approval and page-editability behavior. Necessity: The editing restrictions and approval audit fields are useful and scoped to the reported travel-request behavior. The remaining name-synchronization and test gaps are non-blocking but should be fixed before the behavior is relied on.
|
…age" This reverts commit e68782b.
Good Sense Reviewer - Round 3Recommendation: Accept with SuggestionsWhat this PR doesThis round restricts travel request edits to open requests, records automatic approval audit details, stores and shows the requested-for expense user name, and adds tests for approval audit data, requested-for name updates, and editability rules. Status of previous suggestions
New observations (commits since round 2)S4 (🟠 Moderate): Populate names for existing requests S5 (🟠 Moderate): Keep the derived name read-only Risk assessment and necessityRisk: The build and approval-attribution blockers are fixed. Remaining risk is stale or manually inconsistent requested-for display data. Necessity: The change is needed to prevent editing closed travel requests and to record approval audit information. The derived name should stay trustworthy.
|
Good Sense Reviewer - Round 4Recommendation: Accept with SuggestionsWhat this PR doesThis round keeps the travel-request edit locks, automatic approval audit fields, requested-for name storage, and regression coverage. The latest commits add validation on the requested-for name, lock a few remaining card fields to open requests, and keep approval-name storage aligned with the existing user-id pattern. The remaining issue is still the consistency of the stored requested-for name. Status of previous suggestions
New observations (commits since round 3)None - the latest commits do not introduce a new blocker. The previous requested-for name consistency suggestions remain open. Risk assessment and necessityRisk: The build and approval-audit risks are covered by the current code and checks. The remaining risk is stale or manually inconsistent requested-for display data on travel requests. No BaseApp event-publisher dependency is involved. Necessity: The change is needed to prevent edits after a travel request leaves the open state and to record automatic approval audit data. Showing the requested-for name is useful, but the stored name should stay trustworthy for both old and new requests.
|
Good Sense Reviewer - Round 5Recommendation: AcceptWhat this PR doesThis round keeps the travel-request edit locks, automatic approval audit fields, requested-for name display, and regression coverage. The latest commit changes the requested-for name into a calculated value, so existing and new travel requests show the current expense-user name without storing a separate editable copy. The previous name consistency concerns are addressed, and no new issue was found in the latest changed lines. Status of previous suggestions
New observations (commits since round 4)None - the latest commit only addresses the previous requested-for name consistency suggestions. Risk assessment and necessityRisk: The change is scoped to travel request editing, automatic approval audit data, and requested-for name display. The remaining regression surface is low because the latest change removes duplicated stored name data instead of adding more write paths. Necessity: The change is needed to keep non-open travel requests from being edited, to record automatic approval details, and to show the requested-for name consistently for both existing and new requests.
|
Fixes AB#650480
Problem
Closed travel requests can still be edited, and automatically approved travel requests do not record approver information. The requested-for name is also not shown on the travel request card.
Changes