Skip to content

[APIM] [450]Incorrect "Migrated Policy" Warning on Business Plans Page in Publisher #5151

Description

@Ramiiyan

Description

On the Business Plans page of an API in the Publisher Portal, the following warning may be displayed for a valid subscription policy:

Following policies are migrated from an old version of APIM. You can uncheck and select a different policy. Note that this is an irreversible operation.

This warning is displayed even when the subscription policy:

  • exists in the system,
  • is currently attached to the API, and
  • is correctly applied.

We observed that this can occur when the applied subscription policy is not included in the initial batch of subscription policies loaded by the Publisher (due to the configured page size). As a result, the UI incorrectly treats the policy as a migrated policy instead of recognizing it as an existing one.

This behavior is not limited to legacy subscription policies and can occur with newly created policies as well.

Expected Behavior

The migration warning should only be displayed for subscription policies that genuinely no longer exist (or are truly migrated from older versions).

Valid, existing subscription policies should never be identified as migrated.

Actual Behavior

A valid subscription policy that is correctly attached to an API is incorrectly displayed under the migration warning when it is not included in the initial paginated policy fetch.

Steps to Reproduce

  1. Create a policy starting with the letter "Z" (i.e., zpolicy) to fall outside the default pagination limit size.
  2. Create an API and apply the policy zpolicy.
  3. Create more subscription policies than the configured/default subscriptionPolicyLimit (current default limit is 25).
  4. Open the API's Business Plans page in the Publisher Portal.
  5. Observe that the attached policy is displayed under the "... migrated from an old version of APIM" warning despite being a valid, existing subscription policy.

Version

WSO2 API Manager 4.5.0

Environment Details (with versions)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions