[JENKINS-64356] fix legacyIds missing when creating jobs via REST API or CLI (#9303)

* [JENKINS-64356] call onCreatedFromScratch after creating item via api or cli

When creating jobs via the rest api or cli the call to
onCreatedFromScratch was missing. This can lead to long startup times
when many jobs are created this way.

* remove unused import
This commit is contained in:
Markus Winter authored and GitHub committed 2024-05-26 21:13:58 -06:00
1 parent 8c5026a89f
commit c46dc4becb
2 files changed
+1 -3

No files matched your search

@@ -290,6 +290,7 @@ public abstract class ItemGroupMixIn {
add(result);
result.onCreatedFromScratch();
ItemListener.fireOnCreated(result);
Jenkins.get().rebuildDependencyGraphAsync();