Bug 646141: Forward-port Subcontracting Dispatch List action from 28.x to main - #10080
Conversation
…x to main Forward-ports the net effect of microsoft/BCApps PRs #9012 and #9819 to main: add the app-owned action "Subcontractor Dispatch List" to pageextension "Subc. Work Center Card" (99001506), remove the obsolete app-side modify("Subcontractor - Dispatch List"), and update the two UI tests to reference the app-owned action. Resolves the AppSourceCop AS0031 baseline break exposed by PR #9930 (AppBaselines-BCArtifacts 28.5.53301.0). Preserves main-only notification behavior and CLEAN29 handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Append (Obsolete) to the old Base Application Work Center Card dispatch-list action caption so users can distinguish it from the new Subcontracting app action. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| { | ||
| ApplicationArea = Manufacturing; | ||
| Caption = 'Subcontractor - Dispatch List'; | ||
| Caption = 'Subcontractor - Dispatch List (Obsolete)'; |
There was a problem hiding this comment.
The base page action "Subcontractor - Dispatch List" (Work Center Card) is being deprecated by only appending "(Obsolete)" to its Caption text, while a new differently-named action "Subcontractor Dispatch List" is introduced in the page extension to replace it. The old action is never entered into AL's formal obsoletion lifecycle: no ObsoleteState, ObsoleteReason, or ObsoleteTag is set. Consumers or extensions that customize, automate, or reference the old control by name (including the previous modify("Subcontractor - Dispatch List") pattern this PR removes) get no compiler warning and no structured migration guidance pointing them to the new action/report path. A caption-only rename is not a substitute for the supported obsolete lifecycle and does not prevent continued use of the deprecated control.
Suggested fix (apply manually — could not be anchored as a one-click suggestion):
action("Subcontractor - Dispatch List")
{
ApplicationArea = Manufacturing;
Caption = 'Subcontractor - Dispatch List (Obsolete)';
ObsoleteState = Pending;
ObsoleteReason = 'Replaced by action "Subcontractor Dispatch List" on the Subcontracting page extension, which runs report "Subc. Dispatching List" filtered to the work center''s subcontractor.';
ObsoleteTag = '29.0';
Image = "Report";
//The property 'PromotedCategory' can only be set if the property 'Promoted' is set to 'true'
//PromotedCategory = "Report";
RunObject = Report "Subcontractor - Dispatch List";
}Knowledge:
- microsoft/knowledge/upgrade/obsoletion-requires-reason-and-tag.md
- microsoft/knowledge/upgrade/obsolete-pending-to-removed-staging.md
- microsoft/knowledge/breaking-changes/deprecate-public-members-with-the-obsolete-lifecycle.md
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.31.4
…Subcontracting/bugs/646141-ForwardPortSubcDispatchAction
| begin | ||
| PurchaseHeader.SetRange("Buy-from Vendor No.", Rec."Subcontractor No."); | ||
| Report.Run(Report::"Subc. Dispatching List", true, false, PurchaseHeader); | ||
| end; |
There was a problem hiding this comment.
The new OnAction trigger in the "Subcontractor Dispatch List" action (SubcWorkCenterCard.PageExt.al) filters Purchase Header by Rec."Subcontractor No." and runs the report without first validating that a Subcontractor No. is present. The action's Enabled property gates normal UI invocation, but nothing in the trigger itself enforces the prerequisite, so any other caller (automation, a future promoted/context-menu entry point, or an Enabled-bypass) can run the report with an empty vendor filter. Add Rec.TestField("Subcontractor No.") before building the filter so the failure is explicit and self-documenting.
| begin | |
| PurchaseHeader.SetRange("Buy-from Vendor No.", Rec."Subcontractor No."); | |
| Report.Run(Report::"Subc. Dispatching List", true, false, PurchaseHeader); | |
| end; | |
| begin | |
| Rec.TestField("Subcontractor No."); | |
| PurchaseHeader.SetRange("Buy-from Vendor No.", Rec."Subcontractor No."); | |
| Report.Run(Report::"Subc. Dispatching List", true, false, PurchaseHeader); | |
| end; |
Knowledge:
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.31.4
|
|
||
| // [THEN] Subcontractor - Dispatch List action is not enabled | ||
| Assert.IsFalse(WorkCenterCard."Subcontractor - Dispatch List".Enabled(), SubcontractingActionsEnabledErr); | ||
| Assert.IsFalse(WorkCenterCard."Subcontractor Dispatch List".Enabled(), SubcontractingActionsEnabledErr); |
There was a problem hiding this comment.
These tests now assert only the new page-extension action WorkCenterCard."Subcontractor Dispatch List". After this PR removed the extension's modify("Subcontractor - Dispatch List") { Enabled = IsSubcontractingWorkCenter; } block, there is no remaining test assertion covering the base page's original "Subcontractor - Dispatch List" action, so its (now default-enabled) behavior is no longer verified at all. Add or retain an assertion covering the base action's enabled/obsolete state, or confirm intentionally dropping its coverage is safe.
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.31.4
| RunPageLink = "Work Center No." = field("No."); | ||
| ToolTip = 'View the Subcontracting WIP Entries that track work-in-progress quantities at this work center''s subcontracting location.'; | ||
| } | ||
| action("Subcontractor Dispatch List") |
There was a problem hiding this comment.
The pageextension adds a new, unaffixed action "Subcontractor Dispatch List" to the base "Work Center Card" page. Members (fields/controls/actions) added to a standard/base object must carry the extension's reserved affix individually — the object-level affix on the pageextension itself is not sufficient. Without an affix on this action's name, it can collide with an identically-named action added by another extension, which AppSourceCop's AS0011 rule is designed to catch.
Knowledge:
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.31.4
| { | ||
| ApplicationArea = Manufacturing; | ||
| Caption = 'Subcontractor - Dispatch List'; | ||
| Caption = 'Subcontractor - Dispatch List (Obsolete)'; |
There was a problem hiding this comment.
Same issue as the W1 layer: the "Subcontractor - Dispatch List" action's Caption is renamed to 'Subcontractor - Dispatch List (Obsolete)' without setting ObsoleteState/ObsoleteReason/ObsoleteTag. The action remains fully callable and unconditionally enabled, so there is no compiler-enforced deprecation signal or migration path for consumers still referencing it.
Knowledge:
- microsoft/knowledge/upgrade/obsoletion-requires-reason-and-tag.md
- microsoft/knowledge/breaking-changes/deprecate-public-members-with-the-obsolete-lifecycle.md
- microsoft/knowledge/upgrade/obsolete-pending-to-removed-staging.md
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.31.4
Summary
Forward-ports the net effect of #9012 and #9819 (releases/28.x) to
mainfor the W1 Subcontracting app, resolving the AS0031 AppSourceCop baseline break exposed by #9930 (AppBaselines-BCArtifacts -> 28.5.53301.0).Also differentiates the retained legacy Base Application action from the new app-owned action by changing only its caption to
Subcontractor - Dispatch List (Obsolete).Root cause
"Subcontractor Dispatch List"to pageextension"Subc. Work Center Card"(99001506) and updated two UI tests.modify("Subcontractor - Dispatch List").mainwas never forward-ported: it still had themodify, lacked the app-owned action, and its UI tests referenced the old action name. When [main] Update app baselines package version. New value: 28.5.53301.0 (+ 1 more update(s)) #9930 raises the baseline to 28.5.53301.0, AppSourceCop reports AS0031.Work Center Cardstill exposes the legacy action with the same visible caption as the new action, making the two actions indistinguishable to users.Fix
SubcWorkCenterCard.PageExt.al: add the app-owned action"Subcontractor Dispatch List"and remove the obsolete app-sidemodify("Subcontractor - Dispatch List").SubcSubcontractingUITest.Codeunit.al: update both dispatch-list UI tests to reference the app-owned action identifier.WorkCenterCard.Page.al: preserve the legacy Base Application action identifier"Subcontractor - Dispatch List", but change its caption fromSubcontractor - Dispatch ListtoSubcontractor - Dispatch List (Obsolete).The new Subcontracting app action caption remains
Subcontractor - Dispatch List.Validation
al-mcp-action.sh: 0 errors, 0 warnings.al-mcp-action.sh, but no compatible local developer-services endpoint was available (Navision_NAVstopped;PlatformCorereturned 404).Fixes AB#646141