DependencyTrack / DependencyTrack/dependency-track

Project cloning should provide an option to replicate history of metrics

Open
#4,279 0 comments 1 reaction 0 assignees View on GitHub
enhancement good first issue p2 size/S
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

With DT 4.11 and earlier (did not try 4.12 yet), when I clone a project in UI (Add version) or REST API, there are a number of options to clone and re-assign different related aspects such as the history of (manually assigned) vulnerability alert analyses, but no option to copy the history of project metrics (in database terms, the rows of `PROJECTMETRICS`, possibly `PORTFOLIOMETRICS`, `VULNERABILITYMETRICS`, and/or other tables with time-ranges when some metric counts applied).

As a result, the KPI history of the clone starts just when it was cloned, and forgets the quality history of the codebase before that.

### Proposed Behavior

Add REST API and UI options to copy metric history if the caller wants to (not by default as this can hog storage space).

When copying, rewrite respective IDs as needed.

Code base investigation might start from where the cloning options are defined:
* https://github.com/DependencyTrack/dependency-track/blob/master/src/main/java/org/dependencytrack/resources/v1/vo/CloneProjectRequest.java

### Checklist

- [x] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [x] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this enhancement was already requested

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.