Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13826

Failed automatic object data conversion during a property rename results in data loss

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      (See the 3 attached xar files)

      Steps to reproduce:

      1. Import class-date.xar
      2. Import data-date.xar
      3. Go to Accounts/TestInstance/?editor=object and see the test property of type date with a date value
      4. Import class-string.xar (thus triggering a conversion of the test property from date to string)
      5. Go to Accounts/TestInstance/?editor=object and see the test property of type string with a successfully converted string value
      6. Import class-data.xar (thus triggering a conversion of the test property from string to date)
      7. Go to Accounts/TestInstance/?editor=object and see the test property of type date with a failed conversion and an empty value, thus losing the data.

      Expected result:
      If the conversion fails, the old data should be preserved as a deprecated property value stored in the object, just like it happens when you manually remove and then add a property with the same name (i.e. manually changing the type of a property).

      Attachments

        1. class-date.xar
          1 kB
          Eduard Moraru
        2. class-string.xar
          1 kB
          Eduard Moraru
        3. data-date.xar
          1 kB
          Eduard Moraru
        4. failedAutomaticPropertyConversion-dataLoss.png
          13 kB
          Eduard Moraru

        Activity

          People

            enygma Eduard Moraru
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: