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

Experience Page Documents having a workflow request should have their containers locked in CM

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.3.0
    • None

    Description

      When there is an outstanding (scheduled) (de)publication request, the CM should show the containers locked. However, this is currently not the case, but when trying an action on the container, the action correctly fails nonetheless. The reason is because the html comment does not containan attribute "HST-LockedBy". The reason is that the code for the html comments is like below

      if (FALSE.equals(hints.get(obtainEditableInstance().getAction()))) {
                          // Document most likely locked
                          final String inUseBy = (String) hints.get("inUseBy");
                          if (StringUtils.isNotBlank(inUseBy)) {
                              populatingAttributesMap.put(ChannelManagerConstants.HST_LOCKED_BY, inUseBy);
                          }
                      }
      

      The problem above is that for a (scheduled) (de)publication request the obtainEditableInstance action is not allowed, but at the same time there is no "inUseBy" hint but instead there is a 'requests' hint. If there is no 'requests' hint, the document is locked for some other reason. In that case, for now use 'unknown'.

      cdekort, do you have any preference other than "workflow request" as locked by? In other cases (when for example the entire hst configuration is locked), we use 'system' as locked by, but I don't think we should use 'system' in case of locked by a request. WDYT?

      if (FALSE.equals(hints.get(obtainEditableInstance().getAction()))) {
                          // Document most likely locked
                          final String inUseBy = (String) hints.get("inUseBy");
                          if (StringUtils.isNotBlank(inUseBy)) {
                              populatingAttributesMap.put(ChannelManagerConstants.HST_LOCKED_BY, inUseBy);
                          } else if (hints.get("requests") != null) {
                              populatingAttributesMap.put(ChannelManagerConstants.HST_LOCKED_BY, "workflow request");
                          } else {
                              populatingAttributesMap.put(ChannelManagerConstants.HST_LOCKED_BY, "unknown");
                          }
                      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: