Skip to content

Bug 646141: Forward-port Subcontracting Dispatch List action from 28.x to main - #10080

Open
Chethan Thopaiah (ChethanT) wants to merge 4 commits into
mainfrom
bugs/Subcontracting/bugs/646141-ForwardPortSubcDispatchAction
Open

Bug 646141: Forward-port Subcontracting Dispatch List action from 28.x to main#10080
Chethan Thopaiah (ChethanT) wants to merge 4 commits into
mainfrom
bugs/Subcontracting/bugs/646141-ForwardPortSubcDispatchAction

Conversation

@ChethanT

@ChethanT Chethan Thopaiah (ChethanT) commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Forward-ports the net effect of #9012 and #9819 (releases/28.x) to main for 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

Fix

  1. SubcWorkCenterCard.PageExt.al: add the app-owned action "Subcontractor Dispatch List" and remove the obsolete app-side modify("Subcontractor - Dispatch List").
  2. SubcSubcontractingUITest.Codeunit.al: update both dispatch-list UI tests to reference the app-owned action identifier.
  3. WorkCenterCard.Page.al: preserve the legacy Base Application action identifier "Subcontractor - Dispatch List", but change its caption from Subcontractor - Dispatch List to Subcontractor - Dispatch List (Obsolete).

The new Subcontracting app action caption remains Subcontractor - Dispatch List.

Validation

  • Subcontracting app and test app compile clean from the original forward-port validation.
  • Base Application compiles clean through al-mcp-action.sh: 0 errors, 0 warnings.
  • Publish was attempted through al-mcp-action.sh, but no compatible local developer-services endpoint was available (Navision_NAV stopped; PlatformCore returned 404).
  • No new automated test was added for the caption-only follow-up; the change does not alter behavior or control flow.
  • Independent AL review: 0 findings across UI, style, breaking-change, security, privacy, performance, and upgrade checks.

Fixes AB#646141

…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>
@ChethanT
Chethan Thopaiah (ChethanT) requested a review from a team August 10, 2026 09:14
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 SCM GitHub request for SCM area labels Aug 10, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Aug 10, 2026
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)';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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:

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

Comment on lines +64 to +67
begin
PurchaseHeader.SetRange("Buy-from Vendor No.", Rec."Subcontractor No.");
Report.Run(Report::"Subc. Dispatching List", true, false, PurchaseHeader);
end;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Error\ Handling}$

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.

Suggested change
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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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)';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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:

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant