Skip to content

Only one offer is displayed although several exist (TMF620 ProductOffering list) #356

Description

@Kifli88

Bug: "My Offerings" only displays one offer when multiple exist for the same user

I have noticed an issue in the UI where after creating several offers, only one is displayed in the "My Offerings" section, even though multiple offers exist for the same relatedParty.

Steps to Reproduce
1 Create multiple product offerings with the same relatedParty
2 Navigate to "My Offerings" in the UI and select "Offer"
3 Observe that only the first offer is returned instead of all matching offers

Expected Behavior
All product offerings belonging to the specified relatedParty should be displayed in "My Offerings".

Actual Behavior
Only the first product offering is returned and displayed, even when multiple offers exist for the same relatedParty.

Before fix - only showing 1 offer:
Before fix showing only one offer

Before fix showing only one offer Root Cause & Solution After investigation, I found the issue in the returnQueryRes function where the TMF API call was constructed using the wrong parameter.

File: controllers/catalog.js

Problem:

let newUrl = '/catalog/productOffering?href='
Solution:

let newUrl = '/catalog/productOffering?id='

After fix - multiple offers now visible:
After fix showing multiple offers

Technical Details
The MongoDB query correctly returns multiple offer IDs, but the subsequent TMF API call was using the href parameter instead of the id parameter for querying multiple offering IDs. This caused the backend to only process the first ID in the comma-separated list.

Testing Notes
Due to the lack of integrated tests, I could not create an automated test to reproduce this issue, but the fix should resolve the same issue across all deployments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions