AS0069 - AppSourceCop not respecting EnumExt values when converting Option to Enum
Please include the following with each issue:
1. Describe the bug AS0069 is not including enum extensions when checking the number of values an option field is being converted from.
2. To Reproduce Steps to reproduce the behavior:
- Create table with one field of type Option with 8 option values
- Submit to AppSource and increment your version
- Modify table changing field to type Enum "Sales Document Type"
- Add enum extension to include new enum values
- Build the app
Field before the first submission: field(1; "Document Type"; Option) { Caption = 'Document Type'; DataClassification = CustomerContent; OptionCaption = 'Quote,Order,Application,Application Reversal,Certificate,Certificate Reversal,Invoice,Credit Memo'; OptionMembers = Quote,"Order",Application,"Application Reversal",Certificate,"Certificate Reversal",Invoice,"Credit Memo"; }
Field after the first submission: field(1; "Document Type"; Enum "Sales Document Type") { Caption = 'Document Type'; DataClassification = CustomerContent; }
Enum extension: enumextension 9016662 SalesDocumentTypeEQ2 extends "Sales Document Type" { value(9016659; "Application") { Caption = 'Application'; } value(9016660; "Application Reversal") { Caption = 'Application Reversal'; } value(9016661; "Certificate") { Caption = 'Certificate'; } value(9016662; "Certificate Reversal") { Caption = 'Certificate Reversal'; } value(9016667; "CS Invoice") { Caption = 'CS Invoice'; } value(9016668; "CS Certificate") { Caption = 'CS Certificate'; } value(9016671; "CS Credit Memo") { Caption = 'CS Credit Memo'; } value(9016672; "CS Certificate Reversal") { Caption = 'CS Certificate Reversal'; } }
3. Expected behavior App file to be created.
4. Actual behavior App file is not created, error AS0069 is thrown.
5. Versions:
- AL Language: v9.5.674382
- Visual Studio Code: 1.71.0
- Business Central: 20.4.44313.44365
- List of Visual Studio Code extensions that you have installed: AL Language, Azure Account, Azure Functions, Azure Resources, C#, GitLens