Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
0.25
-
Quasar
-
Puma Sprint 239
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"); } }