microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
733 stars 243 forks source link

Run-AlPipeline: AppSourceCop Error for PageExtension with obsolete Action #6583

Closed ralf-escher closed 2 years ago

ralf-escher commented 3 years ago

We are running AppSourceCop tests based on the CI/CD example and the Run-AlPipeline function, loading the latest released version as previous App.

Switching to BC18 we successfully removed obsolete functions (allowed for Major upgrade).

Our solutions is now divided into a W1 and DE Localization part within BC18. We moved a Page Extension from our german BC17 solution to the BC18 DE Localization App.

To avoid a breaking change we marked the (only) action in the pageextension in BC17 as Obsolete. (we cannot mark the pageextension itself as obsolete).

if we now run Run-AlPipeline the routines fails during compilation:

[error]The 'PageExtension' with ID '5043122' and name 'BET SR Delivery Reminder' was found in the previous version, but is missing in the current extension. This will break dependent extensions.

pageextension 5043122 "BET SR Delivery Reminder" extends "Delivery Reminder"
{
    actions
    {
        addafter("Co&mment")
        {
            action("BET SR Page Ext. Text Line Docs")
            {
                ApplicationArea = All;
                Caption = 'Document Texts';
                Image = ViewComments;
                ObsoleteState = Pending;
                ObsoleteReason = 'Action will be moved to localization extension for W1 compatibility';
                ObsoleteTag = '29.0';
                ToolTip = 'Document Texts.', Comment = 'Auto-Generated en-US=Document Texts.|de-DE=Belegtexte.';
                Visible = StandardReportsVisible;

                trigger OnAction()
                var
                    StandardReportsFunctions: Codeunit "BET SR Report Functions";
                begin
                    StandardReportsFunctions.OpenCommentLines(Rec);
                end;
            }
        }
    }
    var
        [InDataSet]
        StandardReportsVisible: Boolean;

    trigger OnOpenPage()
    var
        GranuleManagement: Codeunit "BET GRN Granule Management";
    begin
        StandardReportsVisible := GranuleManagement.CheckGranuleActive(Enum::"BET GRN Granule"::SR);
    end;
}
ralf-escher commented 2 years ago

Due to our next major upgrade to BC19, we have the same issue again. If we remove PageExtensions with obsolete fields we get again an App Source Cop error from the Run-AlPipeline function. However if we remove those PageExtensions then the Validation through the App Source does succeed.

qutreson commented 2 years ago

@ralf-escher, closing this issue as it is now being tracked by #6803 which has some discussion on the thread.