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

Remove Branch workflow does not replace the unpublished variant when needed

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6.0
    • Component/s: None
    • Labels:
      None
    • Similar issues:
    • Story Points:
      1.5
    • Processed by team:
      Turing
    • Sprint:
      Turing Team 186, Turing Team 187

      Description

      Currently, when removing a branch for a document, we only remove the branch info and keep the content as is. However, this doesn't feel logical when the current unpublished version is for the branch that is being removed. During a meeting we decided the following pattern:

      1) When removing a branch for a document and the current unpublished is for a different branch, it only means removing the <branch>-unpublished (and <branch>-published if present) and from the hippo:handle branches
      2) When removing a branch for a document and the current unpublished is for that branch, we need to first do a checkout of another branch (resulting in current unpublished to be versioned), then remove the branch info, such that the unpublished does not show the removed branch any more.

      To be decided: How to remove a branch if the published version below the handle is for the branch? Most likely the published version should then be replaced with another published version. We could achieve this by first invoking #depublishBranch(<branch-to-remove>)

      the javadoc below also needs to be modified to reflect the above

      /**
           * <p>
           *     Removes the branch for {@code branchId} if it exists and throws a {@link WorkflowException} if it doesn't exist.
           * </p>
           * <p>
           *     Removing a branch which is stored in version history will result in only the JCR version labels for that
           *     branch to be removed. If the current <em>preview</em> variant is for the current branch <em>or</em> the
           *     current <em>live</em> variant is for the current branch, only the branch info will be removed from those
           *     variants. This method will not restore a different branch from version history. history?
           * </p>
           * @param branchId the {@code branchId} to remove
           * @return {@link Document} wrapping the workspace preview node variant
           * @throws WorkflowException in case {@code branchId} does not exist or when checkoutBranch
           *                            is not allowed in the current document state
           */
          void removeBranch(String branchId) throws WorkflowException;
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: