Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContractDefinition turns void by deleting a related Asset #228

Closed
Martin0815bla opened this issue Apr 18, 2023 · 2 comments
Closed

ContractDefinition turns void by deleting a related Asset #228

Martin0815bla opened this issue Apr 18, 2023 · 2 comments
Labels
kind/bug Something isn't working. The software does not behave as expected or specified.

Comments

@Martin0815bla
Copy link

Bug Report

Description

Creating a ContractDefinition to an Asset yields the ContractDefinition Object where the Asset is clickable and viewable as expected.
After deleting the Asset, the ContractDefinitions remains with its own ID instead of the Asset's ID. The Asset is gone as expected

Expected Behaviour

Only ContractDefinition objects with a clickable and valid Asset should show up in the GUI.
Deleting an Asset of an existing ContractDefinition should not be possible or should delete related ContractDefinitions as well

Observed Behaviour

After deleting an Asset of an existing ContractDefinition the ContractDefinition remains and referencing its own ID instead of the Asset ID

Steps to Reproduce

Steps to reproduce the behaviour:

  1. Create an Asset with the connector GUI
  2. Create a ContractDefinition with any policy and the Asset
  3. Delete the Asset
  4. Check the ContractDefinition

Context Information

Connector version 2.0.3

@Martin0815bla Martin0815bla added the kind/bug Something isn't working. The software does not behave as expected or specified. label Apr 18, 2023
@richardtreier
Copy link
Collaborator

This happens due to the limitations in the EDC Managment API for contract definitions.

In the contract definition page, when clicking on a contract definition card's title, you can see what actual data we get from the backend for that contract definition.

Right now the asset information and policy information are added in the UI by fetching the list of policies and assets.

So if an asset is not present in the asset list, we can't even show it's name, and are forced to default to its id, even though the data exists duplicated somewhere in the database in the backend.

This is why we are in the process of gradually replacing the management API endpoints with our own UI API endpoints.

See #175

When exactly the contract definition page will be reworked I can't tell right now, as we will definitely first migrate the contract agreement page and transfer process page, as they are more broken right now.

@richardtreier richardtreier added status/blocked/needs-product requires input from product owner and removed status/blocked/needs-product requires input from product owner labels Aug 31, 2023
@richardtreier
Copy link
Collaborator

Hi, thank you for your bug report.

I will close this issue in favor of #462

@richardtreier richardtreier closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working. The software does not behave as expected or specified.
Projects
None yet
Development

No branches or pull requests

2 participants