dependency-track icon indicating copy to clipboard operation
dependency-track copied to clipboard

Cannot delete project with configured alert

Open bugbouncer opened this issue 7 years ago • 1 comments

Current Behavior:

A project cannot be deleted, if an alert is configured for the project. The error message, when trying to delete the project is not precise about the root cause.

Steps to Reproduce:

  1. Under Administration->Notifications->Alerts create an alert (mine is for MS Teams)
  2. Under "Limit To" select a project, for which the alert should be raised
  3. Navigate to "Projects" and select the project for which the alert has been configured
  4. Select "View Details", click "Delete"
  5. The following error message is displayed in a pop-up: An unexpected error occurred. Please contact the Dependency-Track administrator for assistance (500).

Expected Behavior:

I would expect a more detailed error message, why the project cannot be deleted. In this case, the name of the alert, where the project is contained in, would be great. Alternatively, I want to be asked by the system, if I want to continue the deletion, taking into account that the alert will be modified.

Environment:

  • Dependency-Track Version: 3.6.1
  • Distribution: Docker
  • BOM Format & Version: CycloneDX 1.1
  • Database Server: PostgreSQL
  • Browser: Chrome 78

Additional Details:

Maybe the issue is related to: https://github.com/DependencyTrack/dependency-track/issues/394

Stacktrace from dependency-track.log: 2019-11-25 07:54:25,022 [] ERROR [DataNucleus.Transaction] Operation commit failed on resource: org.datanucleus.store.rdbms.ConnectionFactoryImpl$EmulatedXAResource@6e9e33bf, error code UNKNOWN and transaction [DataNucleus Transaction, ID=2089058294-195576732, enlisted resources=[org.datanucleus.store.rdbms.ConnectionFactoryImpl$EmulatedXAResource@6e9e33bf]] : ERROR: update or delete on table "PROJECT" violates foreign key constraint "NOTIFICATIONRULE_PROJECTS_FK2" on table "NOTIFICATIONRULE_PROJECTS" Detail: Key (ID)=(52) is still referenced from table "NOTIFICATIONRULE_PROJECTS".

bugbouncer avatar Nov 25 '19 07:11 bugbouncer

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 15 '20 18:01 lock[bot]