Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-7924

Revision history - one particular revision access - revision predecessor access

    XMLWordPrintable

Details

    Description

      I wanted to create an excel plugin for the cms to extract documents diff between to dates.
      In order to develop it, I tried to use getPredecessor() on Revision.

      I failed since the revision.index properties does not match the index in the revisionHistory list of revision (so history.getRevision(index - 1) does not match predecessor).

      The load() fonction in revisionHistory

      Possible patch : RevisionHistory => Revision getRevision(int index) :

      Revision getRevision(int index) {
      load();
      if (index >= 0 && index < list.size())

      { return list.get(list.size() - 1 - index); }

      return null;
      }

      Or : remove Collections.reverse(list); in "RevisionHistory.load() "

      (but i didn't study the consequence of the second solution)

      Best regards.

      Attachments

        Issue Links

          Activity

            People

              jsheriff Junaidh Kadhar Sheriff
              mericgarcia Méric Garcia
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: