Commit 6f830f0
committed
fix: dispatch metrics update for collection parent on bulk project delete
When child projects are deleted via deleteProjectsByUUIDs, their parent
collection project's metrics are now recalculated. Previously the stale
aggregated metrics (vuln counts, risk scores, etc.) would persist on the
collection project indefinitely after all children were removed.
The single-delete path (recursivelyDelete) already handled this correctly;
this aligns the bulk-delete path with the same behaviour.
Signed-off-by: Valentijn Scholten <valentijnscholten@gmail.com>1 parent d0078ec commit 6f830f0
2 files changed
Lines changed: 54 additions & 0 deletions
File tree
- src
- main/java/org/dependencytrack/persistence
- test/java/org/dependencytrack/persistence
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
1022 | 1032 | | |
1023 | 1033 | | |
1024 | 1034 | | |
| |||
1325 | 1335 | | |
1326 | 1336 | | |
1327 | 1337 | | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
1328 | 1342 | | |
1329 | 1343 | | |
1330 | 1344 | | |
| |||
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
135 | 175 | | |
0 commit comments