This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-ace96369-073e-450f-aee2-64f0d3897727 XWIKI-23524 Open

Calling PropertyClass#setName should properly rename existing properties in belonging classes

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-b087db87-7ed2-4a95-adf0-69c5f92b3717 Raphaël Jakse created this issue on 12/Sep/25 12:12
 
Summary: Calling PropertyClass#setName should properly rename existing properties in belonging classes
Issue Type: cid:jira-generated-image-avatar-ace96369-073e-450f-aee2-64f0d3897727 Bug
Affects Versions: 17.7.0
Assignee: Unassigned
Components: Old Core
Created: 12/Sep/25 12:12
Priority: cid:jira-generated-image-static-major-96e0b93f-9e56-4a8c-a5ce-c957b0cdacaf Major
Reporter: Raphaël Jakse
Description:

It might be tempting to call com.xpn.xwiki.objects.classes.PropertyClass.setName(name) to rename a property but this is likely to cause a serious mess.

This method should probably be updated to allow renaming a property in existing classes, and trigger a migration of the instances of the related class upon saving.