Skip to content

Conversation

@TowerMyhrer
Copy link
Contributor

@TowerMyhrer TowerMyhrer commented Dec 22, 2025

This Pr vil give a own table for PTE Apps and their versions.
It is updating the versoions with help from the rest client for Nuget.
Github is tested and working as a source of the Nuget package but for azure devops it need the final touch from someone that have a Azure devops to test against.
Github is using a PAT as token for read access to package.

This PR fix issue #58

Copilot AI review requested due to automatic review settings December 22, 2025 19:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new PTE (Per Tenant Extension) Apps management feature that integrates with NuGet package repositories to track and retrieve app versions. The implementation supports GitHub and Azure DevOps as DevOps platforms, using their respective NuGet feeds to fetch available app versions via REST API calls.

Key changes:

  • New PTE Apps and PTE App Versions tables with associated UI pages
  • NuGet integration using REST client to query package versions from GitHub and Azure DevOps
  • DevOps organization management with PAT token storage
  • Integration with existing PTE Object Range functionality

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
D4PBCNugetProcessing.Codeunit.al Core logic for retrieving and processing PTE app versions from NuGet feeds
D4PBCGitHubUpdate.Codeunit.al GitHub-specific implementation for NuGet service discovery and authentication
D4PBCAzureUpdate.Codeunit.al Azure DevOps implementation for NuGet service access (currently disabled)
D4PBCNoDevopsUpdate.Codeunit.al No-op implementation for apps without DevOps integration
D4PBCDevOpsUpdate.Interface.al Interface defining DevOps update contracts
D4PBCDevOpsEnvironments.Enum.al Enum for supported DevOps platforms
D4PBCPTEApp.Table.al Table storing PTE app metadata including DevOps configuration
D4PBCPTEAppVersion.Table.al Table storing individual app version records
D4PBCPTEAppsList.Page.al List page for managing PTE apps with version retrieval action
D4PBCPTEAppCard.Page.al Card page for PTE app details with versions factbox
D4PBCPTEAppVersionCard.Page.al Card page for app version details with download capability
D4PPTEAppVersionsFactBox.Page.al FactBox showing available versions for a PTE app
D4PBCDevOpsOrganization.Table.al Table for storing DevOps organizations with PAT tokens
D4PBCDevOpsOrgList.Page.al List page for managing DevOps organizations
D4PBCInputToken.Page.al Dialog page for PAT token input
D4PPTEObjectRangeList.page.al Added table relation and auto-population from PTE Apps
D4PPTEObjectRange.table.al Added procedure to copy values from PTE App record
Translation files (multiple) Updated with new translatable strings for the feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 22, 2025 19:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 22, 2025 19:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 22, 2025 19:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 22, 2025 19:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 22, 2025 19:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 22, 2025 20:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 22, 2025 20:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fvet
Copy link
Contributor

fvet commented Jan 12, 2026

@TowerMyhrer I started reviewing, but in the meanwhile fixed the (minor) enhancements on a separate branch, since I had no access to the fork.

See TowerMyhrer#1

Above is just clutter / styling / UX.

I'm not fully understanding the actual functional requirement (besides the needs to create a 'PTE App' table) on what 'PTE management' actually tries to solve.

  • What is the 'Devops Organisation' meant to be used for (id vs name, Primary key, ...) (No need for project / repo ?)
    Can you provide a screenshot with recommended setup?
image
  • What if a PTE app has multiple from/to ranges? How to cope with such apps?
  • (not related to this PR) What is the real purpose / use case to maintain the "D4P PTE Object Range" table?

@TowerMyhrer
Copy link
Contributor Author

  • What if a PTE app has multiple from/to ranges? How to cope with such apps?

I will add the possibility to have several ranges.
and I will create documentation for how to set up and how to use. the informatipon in the devops orgajization is used for getting the packagae information with a call for the nuget service at the devops
Will provide documentation

Copilot AI review requested due to automatic review settings January 13, 2026 13:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 26 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TowerMyhrer TowerMyhrer requested review from Copilot and fvet February 9, 2026 23:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 44 changed files in this pull request and generated 11 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TowerMyhrer
Copy link
Contributor Author

Please review

Copilot AI review requested due to automatic review settings February 10, 2026 18:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 44 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 10, 2026 18:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 44 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


using D4P.CCMS.Nuget;

page 62033 "D4P BC PTE App List"
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

Page ID 62033 is also used by other newly added pages in this PR ("D4P PTE App Versions FactBox" and "D4P BC Input Token"). In AL, page object IDs must be unique, so this will fail to compile. Assign unique page IDs across these three page objects (keep one at 62033 and renumber the others).

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 10, 2026 22:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 44 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


using D4P.CCMS.Nuget;

page 62051 "D4P BC PTE App Card"
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This page object ID (62035) conflicts with the newly added list page D4P BC PTE App List which is also declared as page 62035. AL page IDs must be unique; change one of the page IDs to a free number and update any references (e.g., CardPageId/Run calls) accordingly.

Suggested change
page 62051 "D4P BC PTE App Card"
page 62036 "D4P BC PTE App Card"

Copilot uses AI. Check for mistakes.
Comment on lines 15 to 26
field(Token; Token)
{
Caption = 'Personal Access Token';
ToolTip = 'Specifies the Personal Access Token for DevOps organization access.';
MultiLine = true;
}
}
}
}

var
Token: Text[250];
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The PAT is captured and stored via a plain Text[250] variable and displayed unmasked (MultiLine). This increases the risk of accidental disclosure (screen sharing, screenshots) and also relies on implicit conversion from Text to SecretText in GetToken(). Prefer capturing the token as SecretText end-to-end (or, if the UI requires Text, apply masking via ExtendedDatatype = Masked and convert explicitly to SecretText before storing).

Suggested change
field(Token; TokenPlain)
{
Caption = 'Personal Access Token';
ToolTip = 'Specifies the Personal Access Token for DevOps organization access.';
MultiLine = true;
ExtendedDatatype = Masked;
trigger OnValidate()
begin
Token := TokenPlain;
end;
}
}
}
}
var
Token: SecretText;
TokenPlain: Text[250];

Copilot uses AI. Check for mistakes.
tabledata "D4P BC PTE App Version" = R,
tabledata "D4P BC DevOps Organization" = R,
tabledata "D4P BC Environment Operation" = R,
tabledata "D4P BC PTE Object Range" = R,
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This permission set now includes both the legacy D4P PTE Object Range and the new D4P BC PTE Object Range. That’s fine if intentional, but note that D4P BC PTE Object Range appears to be added twice in this file (once in tabledata and once in table objects is expected; but ensure it’s not duplicated within the same section across the full file). If there are duplicates within the same Permissions = list in the full file, AL can fail compilation or at least bloat the permission definition—remove redundant entries.

Suggested change
tabledata "D4P BC PTE Object Range" = R,

Copilot uses AI. Check for mistakes.
Comment on lines 64 to 69
table "D4P PTE Object Range" = X,
table "D4P BC PTE App" = X,
table "D4P BC PTE App Version" = X,
table "D4P BC DevOps Organization" = X,
table "D4P BC Environment Operation" = X,
table "D4P BC PTE Object Range" = X,
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This permission set now includes both the legacy D4P PTE Object Range and the new D4P BC PTE Object Range. That’s fine if intentional, but note that D4P BC PTE Object Range appears to be added twice in this file (once in tabledata and once in table objects is expected; but ensure it’s not duplicated within the same section across the full file). If there are duplicates within the same Permissions = list in the full file, AL can fail compilation or at least bloat the permission definition—remove redundant entries.

Copilot uses AI. Check for mistakes.
Comment on lines 34 to 36
### Object RAnges

![Object RAnges](./media/PTEAppCardObjectRanges.png)
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The link target DevOpsOrganization.md does not match the added documentation filename (dev-ops-organization.md), so the link will be broken. Also, the heading/image alt text uses inconsistent casing (RAnges). Update the link and normalize the text/casing to improve navigability and readability.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PTE App in its own table

7 participants