Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22519

Duplicating a content version results in an empty draft if maximum versions is reached



      Content versions in eZ Publish are listed by creation date, and we can see all existing versions of an object under /content/history/<object_id>

      We can also define a maximum number of versions for all content objects, or for each content object of a given content class.
      The issue is not really the number of versions we allow, but the way eZ Publish creates new version: it checks the number of existing versions, compares to the maximum allowed version number, and if the maximum version number has been reached already it removes the oldest one. And after that, it will proceed and create a new version as a draft.
      So far so good.
      This gives us a huge problem if we need to copy the oldest version and we already reached the maximum number of versions.
      In that case, the oldest version will be removed, and an empty draft will created, instead of a copy of the desired version.

      Steps to reproduce:

      1. Create one folder from the administration backed and send it to publish
      2. Edit the same folder 4 more times, in order to get 5 versions (which is the maximum by default)
      3. Click the "Manage versions" button
      4. Copy the oldest version of your folder

      You should get an empty draft, which is wrong.

        Issue Links


          Yannick Roger (Inactive) logged work - 27/Mar/14 2:44 PM
          • Time Spent:
            3 hours


          Yannick Roger (Inactive) logged work - 28/Mar/14 1:44 PM
          • Time Spent:
            3 hours
            <No comment>
          Pedro Resende (Inactive) logged work - 31/Mar/14 5:54 PM
          • Time Spent:
            3 hours, 30 minutes

            Worked on story


            • Assignee:
              Ricardo Correia (Inactive)
            • Votes:
              0 Vote for this issue
              8 Start watching this issue


              • Created:

                Time Tracking

                Original Estimate - Not Specified
                Not Specified
                Remaining Estimate - 0 minutes
                Time Spent - 1 day, 1 hour, 30 minutes
                1d 1h 30m