-
Improvement
-
Resolution: Fixed
-
Major
The CloudBees Folders plugin offers a function to move a job from one item group (folder, Jenkins root) to another. But since ItemListener has no onMoved method, it has to fire a deletion event from the old location and then a create event in the new location. This prevents core and plugins from updating item fullName references, for example in BuildTrigger.
onRenamed does not suffice since this is documented to deal with name, not fullName.
- is related to
-
JENKINS-18680 View.onJobRenamed should be deprecated
-
- Resolved
-
-
JENKINS-20008 Need core API corresponding to ItemGroupModifier
-
- Resolved
-
Code changed in jenkins
User: Jesse Glick
Path:
core/src/main/java/hudson/model/AbstractItem.java
core/src/main/java/hudson/model/ItemGroupMixIn.java
core/src/main/java/hudson/model/Items.java
core/src/main/java/hudson/model/listeners/ItemListener.java
core/src/main/java/jenkins/model/DirectlyModifiableTopLevelItemGroup.java
core/src/main/java/jenkins/model/Jenkins.java
test/src/main/java/org/jvnet/hudson/test/MockFolder.java
test/src/test/java/org/jvnet/hudson/test/MockFolderTest.java
http://jenkins-ci.org/commit/jenkins/9fc87f4a22ef4e32445451f5114fb800b6b73e9e
Log:
[FIXED JENKINS-18028] Providing a supported way to move an item between folders, firing changes as we go.