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

Public API should support version history limit

    Details

    • Sprint:
      Castor Core S6

      Description

      eZ Publish legacy has a configurable version history limit, which allows specifying a maximum number of published versions.

      On the 5.x SF stack, the Public API should support the same or similar setting, so that content does not grow unbounded when publishing new versions.

      However it should only limit the archive versions so we avoid the same pitfalls as legacy, separate setting or behavior for drafts can be introduced later.

        Issue Links

          Activity

          Hide
          André Rømcke added a comment - - edited

          Changed issue to improvement as this functionality was never documented as part of the API, however we are aware that this is critical missing feature so I also upgraded priority and put it on top of our que meaning we should be able to handle it within the next month. We'll also back port this to 5.3.4/5 as well.

          However 5.2 is nearing end of life so will most likely not back port there as we won't have time to fix regressions this might introduce (as this is a feature it has quite some risk of regressions) before end of life is reached.

          Show
          André Rømcke added a comment - - edited Changed issue to improvement as this functionality was never documented as part of the API, however we are aware that this is critical missing feature so I also upgraded priority and put it on top of our que meaning we should be able to handle it within the next month. We'll also back port this to 5.3.4/5 as well. However 5.2 is nearing end of life so will most likely not back port there as we won't have time to fix regressions this might introduce (as this is a feature it has quite some risk of regressions) before end of life is reached.
          Hide
          Harald Tollefsen added a comment -

          This issue is marked as critical and unresolved, but doesn't seem to be going much forward. When will get back into a sprint?

          Show
          Harald Tollefsen added a comment - This issue is marked as critical and unresolved, but doesn't seem to be going much forward . When will get back into a sprint?
          Hide
          Peter Keung added a comment -

          We have been using this interim solution in our scripts: http://www.mugo.ca/Blog/Version-history-limit-in-eZ-Publish-5

          Show
          Peter Keung added a comment - We have been using this interim solution in our scripts: http://www.mugo.ca/Blog/Version-history-limit-in-eZ-Publish-5
          Show
          André Rømcke added a comment - WIP PR: https://github.com/ezsystems/ezpublish-kernel/pull/1811
          Hide
          André Rømcke added a comment - - edited

          Merged, master:

          DOC/QA:

          Introduces a new API feature to limit number of versions per content, it is exposed with a new setting to control a global default_version_archive_limit repository setting, out of the box set to 5. It can be customized using:

           ezpublish:
              repositories:
                  default:
                      options:
                          default_version_archive_limit: 10
          

          Typically in ezplatform.yml (ezpublish.yml for 5.4).

          Differences (on purpose) from legacy:

          • It only act on archive versions, not on drafts etc => On eZ Platform a separate feature is needed to delete old drafts using cronjob, this exists in 5.x as part of legacy
          • It does not allow config per content type => This can come in the future as a feature of the repository as opposed to a config setting allowing it to be defined on advance options for ContentType.
          Show
          André Rømcke added a comment - - edited Merged, master: https://github.com/ezsystems/ezpublish-kernel/commit/6e4e6cb24a3b6868691ffa475daa9ea2dd1ca35d https://github.com/ezsystems/ezpublish-kernel/commit/b5f511834c713c185d34ff322780b8672d1a9c01 DOC/QA: Introduces a new API feature to limit number of versions per content, it is exposed with a new setting to control a global default_version_archive_limit repository setting, out of the box set to 5 . It can be customized using: ezpublish: repositories: default: options: default_version_archive_limit: 10 Typically in ezplatform.yml ( ezpublish.yml for 5.4) . Differences (on purpose) from legacy: It only act on archive versions, not on drafts etc => On eZ Platform a separate feature is needed to delete old drafts using cronjob, this exists in 5.x as part of legacy It does not allow config per content type => This can come in the future as a feature of the repository as opposed to a config setting allowing it to be defined on advance options for ContentType.
          Show
          Dominika Kurek added a comment - Documented in https://doc.ez.no/display/DEVELOPER/Repository#Repository-LimitofarchivedContentitemversions and https://doc.ez.no/display/EZP/Content+Repository+configuration#ContentRepositoryconfiguration-LimitofarchivedContentitemversions
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for 5.4 and master.
          Documentation validated as well.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for 5.4 and master. Documentation validated as well.

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Inacio (Inactive)
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 1 day
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Agile