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

    Details

      Description

      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

          Activity

          Ricardo Correia (Inactive) created issue -
          Ricardo Correia (Inactive) made changes -
          Field Original Value New Value
          Description 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:**

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

          You should get an empty draft, which is wrong.
          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:*

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

          You should get an empty draft, which is wrong.
          Ricardo Correia (Inactive) made changes -
          Status Open [ 1 ] Confirmed [ 10037 ]
          André Rømcke made changes -
          Status Confirmed [ 10037 ] InputQ [ 10001 ]
          Yannick Roger (Inactive) made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Assignee Yannick Roger [ yannick.roger@ez.no ]
          Yannick Roger (Inactive) made changes -
          Affects Version/s 5.2 [ 12582 ]
          Affects Version/s 5.1 [ 11280 ]
          Affects Version/s 5.0 [ 10300 ]
          Affects Version/s 5.3-dev [ 12979 ]
          Yannick Roger (Inactive) made changes -
          Remote Link This issue links to "PR (Web Link)" [ 13911 ]
          Yannick Roger (Inactive) made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 3 hours [ 10800 ]
          Worklog Id 47166 [ 47166 ]
          Yannick Roger (Inactive) made changes -
          Status Development [ 3 ] Development review [ 10006 ]
          Yannick Roger (Inactive) made changes -
          Time Spent 3 hours [ 10800 ] 6 hours [ 21600 ]
          Worklog Id 47167 [ 47167 ]
          Yannick Roger (Inactive) made changes -
          Status Development review [ 10006 ] Development Review done [ 10028 ]
          Fix Version/s 4.7 Maintenance [ 12583 ]
          Fix Version/s 5.0 Maintenance [ 11287 ]
          Fix Version/s 5.3 [ 11282 ]
          Fix Version/s 5.1 Maintenance [ 12301 ]
          Fix Version/s 5.2 Maintenance [ 12782 ]
          Yannick Roger (Inactive) made changes -
          Status Development Review done [ 10028 ] Documentation done [ 10011 ]
          Pedro Resende (Inactive) made changes -
          Status Documentation done [ 10011 ] QA [ 10008 ]
          Assignee Yannick Roger [ yannick.roger@ez.no ] Pedro Resende [ pedro.resende@ez.no ]
          Pedro Resende (Inactive) made changes -
          Rank Ranked higher
          Pedro Resende (Inactive) made changes -
          Flagged Impediment [ 10000 ]
          Pedro Resende (Inactive) made changes -
          Status QA [ 10008 ] InputQ [ 10001 ]
          Assignee Pedro Resende [ pedro.resende@ez.no ]
          Pedro Resende (Inactive) made changes -
          Time Spent 6 hours [ 21600 ] 1 day, 1 hour, 30 minutes [ 34200 ]
          Worklog Id 47220 [ 47220 ]
          Yannick Roger (Inactive) made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Assignee Yannick Roger [ yannick.roger@ez.no ]
          Yannick Roger (Inactive) made changes -
          Flagged Impediment [ 10000 ]
          Yannick Roger (Inactive) made changes -
          Remote Link This issue links to "PR for the regression (Web Link)" [ 14003 ]
          Yannick Roger (Inactive) made changes -
          Status Development [ 3 ] Development review [ 10006 ]
          Yannick Roger (Inactive) made changes -
          Status Development review [ 10006 ] Development Review done [ 10028 ]
          Yannick Roger (Inactive) made changes -
          Status Development Review done [ 10028 ] Documentation done [ 10011 ]
          Eduardo Fernandes (Inactive) made changes -
          Assignee Yannick Roger [ yannick.roger@ez.no ] Eduardo Fernandes [ eduardo.fernandes@ez.no ]
          Paulo Nunes (Inactive) made changes -
          Status Documentation done [ 10011 ] QA [ 10008 ]
          Assignee Eduardo Fernandes [ eduardo.fernandes@ez.no ] Paulo Nunes [ paulo.nunes@ez.no ]
          Paulo Nunes (Inactive) made changes -
          Assignee Paulo Nunes [ paulo.nunes@ez.no ] Eduardo Fernandes [ eduardo.fernandes@ez.no ]
          Eduardo Fernandes (Inactive) made changes -
          Assignee Eduardo Fernandes [ eduardo.fernandes@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          André Rømcke made changes -
          Workflow eZ Engineering Scrumban Workflow [ 62415 ] EZ* Development Workflow [ 84864 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 84864 ] EZEE Development Workflow [ 123568 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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