Skip to content

Conversation

@AndyButland
Copy link
Contributor

Prerequisites

  • I have added steps to test this contribution in the description below

Fixes #19275

Description

When a package doesn't define a package Id, it's name is used to identify it's migration status in the umbracoKeyValue table. But when looking for the status, we were only using the ID.

This PR corrects that and also resolves a small localization issue with the "Run pending package migrations" button.

Copilot AI review requested due to automatic review settings May 8, 2025 10: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

This PR fixes how pending package migrations are displayed by ensuring that packages without a PackageId properly fallback to using the package name when retrieving migration status, and it updates the localization key for the migration button.

  • Updated the localization key for the "Run pending package migrations" button in the UI.
  • Modified the key retrieval logic in the packaging service to use the package name as a fallback when PackageId is missing.

Reviewed Changes

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

File Description
src/Umbraco.Web.UI.Client/src/packages/packages/package-section/views/installed/installed-packages-section-view-item.element.ts Updates the button label's localization term to fix the localization issue.
src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs Adjusts key concatenation to correctly use PackageName when PackageId is absent.
Comments suppressed due to low confidence (2)

src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs:329

  • [nitpick] Consider renaming 'packageKey' to 'migrationKey' to more clearly reflect its purpose in referencing a migration status key.
var packageKey = Constants.Conventions.Migrations.KeyValuePrefix + (group.Key.PackageId ?? group.Key.PackageName);

src/Umbraco.Web.UI.Client/src/packages/packages/package-section/views/installed/installed-packages-section-view-item.element.ts:134

  • Please confirm that the new localization key 'packager_packageMigrationsRun' is available in the localization resources to ensure the button displays correctly.
label=${this.localize.term('packager_packageMigrationsRun')}>

@Migaroez Migaroez merged commit 367a13b into release/16.0 May 8, 2025
24 checks passed
@Migaroez Migaroez deleted the v16/bugfix/correct-display-of-pending-migrations branch May 8, 2025 14:14
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.

3 participants