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

PATCH v1/project/{id} doesn't update externalReferences #2695

Closed
2 tasks done
heubeck opened this issue Apr 19, 2023 · 1 comment · Fixed by #2700
Closed
2 tasks done

PATCH v1/project/{id} doesn't update externalReferences #2695

heubeck opened this issue Apr 19, 2023 · 1 comment · Fixed by #2700
Labels
defect Something isn't working
Milestone

Comments

@heubeck
Copy link
Contributor

heubeck commented Apr 19, 2023

Current Behavior

A project imported via the api using
PUT v1/bom which BOM doesn't contain any externalReferences shall is updated using
PATCH v1/project/{id} with externalReferences, but api server responds with 304.

Reproducing on api-server 4.8.0 using curl:

curl -H "Content-Type: application/json" -H "X-API-Key: for-my-eyes-only" https://dependency-track-is-awe.some/api/v1/project/098f5f0b-2e3c-43c6-bcd9-0885d6524611 -X PATCH -d '{"externalReferences":[{"type":"vcs","url":"https://github.com/my-awesome/project"}]}'

Result: http 304, no change in the project
Further properties to the PATCH payload get respected and the project changes.

Steps to Reproduce

  1. create a project using PUT v1/bom - but probably that's not the matter
  2. look at the project using GET v1/project/{id} or the UI: no externalReferences
  3. PATCH v1/project/{1} with externalReferences
  4. look again: still no externalReferences

Expected Behavior

external references can get updated using PATCH v1/project/{id}

Dependency-Track Version

4.8.0

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

14

Browser

Google Chrome

Checklist

@heubeck heubeck added defect Something isn't working in triage labels Apr 19, 2023
heubeck added a commit to heubeck/dependency-track that referenced this issue Apr 20, 2023
heubeck added a commit to heubeck/dependency-track that referenced this issue Apr 20, 2023
heubeck added a commit to heubeck/dependency-track that referenced this issue Apr 20, 2023
heubeck added a commit to heubeck/dependency-track that referenced this issue Apr 20, 2023
heubeck added a commit to heubeck/dependency-track that referenced this issue Apr 20, 2023
nscuro added a commit that referenced this issue Apr 26, 2023
…alProjectRefs

Issue #2695: Add externalReferences to PATCH project
@nscuro nscuro removed the in triage label Apr 30, 2023
nscuro pushed a commit to nscuro/dependency-track that referenced this issue Apr 30, 2023
@nscuro nscuro added this to the 4.8.1 milestone Apr 30, 2023
@nscuro nscuro mentioned this issue Apr 30, 2023
3 tasks
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
defect Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants