porscheinformatik / sonarqube-licensecheck

SonarQube Licensecheck Plugin
Apache License 2.0
159 stars 58 forks source link

Cannot delete Project Licenses if there is only one entry #366

Open ashrafmr opened 1 year ago

ashrafmr commented 1 year ago

Nothing happens at all when clicking the 'Delete' button. Tried action on Firefox and Edge browsers.

image

A POST request is sent, https://*****/api/settings/set Body: key=licensecheck.project-license-set

Response: {"errors":[{"msg":"Either \u0027value\u0027, \u0027values\u0027 or \u0027fieldValues\u0027 must be provided"}]}

XHRPOSThttps://*****/api/settings/set [HTTP/1.1 400 158ms]

Uncaught (in promise) Response { type: "basic", url: "https://*****/api/settings/set", redirected: false, status: 400, ok: false, statusText: "", headers: Headers(7), body: ReadableStream, bodyUsed: false }

derkoe commented 1 year ago

I see this only happens if there is only one project license left - this last one cannot be deleted because SonarQube does not accept the empty value.