Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-2128

BranchHandleImpl#isModified can incorrectly indicate that a document is not modified

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6.0, 12.6.0
    • Component/s: None
    • Labels:
      None
    • Similar issues:
    • Processed by team:
      Turing
    • Sprint:
      Turing Sprint 192, Turing Sprint 191, Turing Sprint 193

      Description

      Currently, the code is as follows:

          private boolean isModified(final DocumentVariant unpublished, final DocumentVariant published) {
              try {
                  return unpublished.getLastModified().after(published.getLastModified());
              } catch (RepositoryException e) {
                  log.error("Cannot determine if document {} is modified, returning false", unpublished.getIdentity(), e);
                  return false;
              }
          }
      

      This means that if you restore a document from version history with a last modified timestamp that is before the published timestamp, the isModified returns false and IIRC, the document cannot be published. AFAICS, isModified should check for last modified inequality, not before/after logic

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aschrijvers Ard Schrijvers
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: