Cannot delete project with configured alert
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:
- Under Administration->Notifications->Alerts create an alert (mine is for MS Teams)
- Under "Limit To" select a project, for which the alert should be raised
- Navigate to "Projects" and select the project for which the alert has been configured
- Select "View Details", click "Delete"
- 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".
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.