This issue has been created
There are 2 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-1724727e-ab8f-4df1-b90e-e9f1b54bf397 XWIKI-24079 Open

PropertyMigrator doesn't properly handle reimporting list values

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-34d73bb4-b15e-45cb-b43f-a39307f1f7f3 Simon Urli created this issue on 03/Mar/26 11:47
 
Summary: PropertyMigrator doesn't properly handle reimporting list values
Issue Type: cid:jira-generated-image-avatar-1724727e-ab8f-4df1-b90e-e9f1b54bf397 Bug
Affects Versions: 17.10.3
Assignee: Unassigned
Components: Old Core
Created: 03/Mar/26 11:47
Priority: cid:jira-generated-image-static-major-8b7a65ae-a88d-418a-b70e-3628e2540980 Major
Reporter: Simon Urli
Description:

Reproduction steps:

  • Prepare a XAR with following instructions (optional step: a XAR is already attached containing what's needed):
  • Create a page XClassTest.WebHome
  • Edit it using the class editor and add a static list field named "staticListMultiCustomSep"
  • Edit the property to ensure it supports multiselect, it uses input and the separator for edition is "#"
  • Create a page XClassTest.MyObj.WebHome
  • Create a new object of type "XClassTest" in that page, and provide values "foo", "bar" and "buz"
  • Save the page and export the page MyObj only as XAR
  • Then delete the hierarchy XClassTest
  • Go to Administration > Import
  • Import the XAR
  • Go to the created page XClassTest.MyObj.WebHome and open the object editor to check the contained objects, it should display a deprecated object with a value "[foo, bar, buz]"
  • Without changing anything, go to XClassTest.WebHome and create the page
  • Go to the class editor and creates a new static list field named "staticListMultiCustomSep"
  • Edit the property to ensure it supports multiselect
  • Go back to XClassTest.MyObj.WebHome and open the object editor

Expected result:

  • The property value of staticListMultiCustomSep in the object contains "foo", "bar", "buz"

Obtained result:

  • The property only contains "foo": "bar" and "buz" are lost
 
 

2 updates

 
cid:jira-generated-image-avatar-34d73bb4-b15e-45cb-b43f-a39307f1f7f3 Changes by Simon Urli on 03/Mar/26 11:47
 
Attachment: XClassTest.MyObj.WebHome.xar
Priority: Major Critical
 
 

1 comment

 
cid:jira-generated-image-avatar-34d73bb4-b15e-45cb-b43f-a39307f1f7f3 Simon Urli on 03/Mar/26 11:48
 

This bug is most likely related with XWIKI-19185: the migrator is triggered as soon as the static list property is created, and by default it's created without multi select enabled...