From 2c3953ae1961578754bddb3262707523628edbc3 Mon Sep 17 00:00:00 2001 From: Callum Whyte Date: Mon, 2 May 2022 09:58:53 +0100 Subject: [PATCH] Returning all packages from PackagingService so they show in the backoffice (#12322) * Add pr first response workflow * Returning all packages from PackagingService so they show in the backoffice Co-authored-by: Sebastiaan Janssen Co-authored-by: Bjarke Berg Co-authored-by: Paul Johnson --- .../Services/Implement/PackagingService.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs b/src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs index 6297728167..ee360b433e 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs @@ -116,7 +116,7 @@ namespace Umbraco.Cms.Core.Services.Implement var installedPackages = new Dictionary(); // Collect the package from the package migration plans - foreach(PackageMigrationPlan plan in _packageMigrationPlans) + foreach (PackageMigrationPlan plan in _packageMigrationPlans) { if (!installedPackages.TryGetValue(plan.PackageName, out InstalledPackage? installedPackage)) { @@ -144,7 +144,7 @@ namespace Umbraco.Cms.Core.Services.Implement } // Collect and merge the packages from the manifests - foreach(PackageManifest package in _manifestParser.GetManifests()) + foreach (PackageManifest package in _manifestParser.GetManifests()) { if (package.PackageName is null) { @@ -157,17 +157,15 @@ namespace Umbraco.Cms.Core.Services.Implement { PackageName = package.PackageName }; + installedPackages.Add(package.PackageName, installedPackage); } installedPackage.PackageView = package.PackageView; } - // Filter the packages listed here. i.e. only packages that have migrations or views. - // Else whats the point in showing them? - return installedPackages - .Values - .Where(x => !x.PackageView.IsNullOrWhiteSpace() || x.PackageMigrationPlans.Any()); + // Return all packages with a name in the package.manifest or package migrations + return installedPackages.Values; } #endregion