Details
-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
5.4.5
-
Unknown
-
Description
Let's see XWikiPreferencesDocumentInitializer.
needsUpdate |= bclass.addTextField("parent", "Parent Space", 30);
Here, addTestField returns true only of the property "parent" did not exist before. The second argument is the pretty name.
But if the property was already existing, it returns false, and does not upgrade the pretty name.
It is the behaviour of every add*Field methods of the class BaseClass.
In practice, it is not very important because DW does the upgrade with the XWikiPreferences that we have in the default XARs (that we need to maintain up to date by the way!).
But in some circumstances, it could happen that the upgrade is not performed (see: XWIKI-11079).
We should fix this issue by creating and use a setTextField method (and setBooleanField, etc...) that would also upgrade the properties of the field.
Attachments
Issue Links
- duplicates
-
XWIKI-13969 Provide helper to make easier to migrate classes in mandatory documents
- Closed
- is duplicated by
-
XWIKI-11079 Bad HQL query in the 'colorTheme' property of XWikiPreferences in a subwiki after an upgrade from 6.1 to 6.2
- Closed