Merge branch 'feature/RM-7093_UpdateItemLocation' into 'master'

RM-7093 Update item location to include the provenience site

Closes RM-7093

See merge request records-management/records-management!1335
This commit is contained in:
Claudia Agache
2019-12-13 09:32:14 +00:00
5 changed files with 13 additions and 12 deletions

View File

@@ -93,7 +93,6 @@ import org.alfresco.util.PropertyCheck;
import org.alfresco.util.PropertyMap;
import org.alfresco.util.TempFileProvider;
import org.alfresco.util.transaction.TransactionListenerAdapter;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -138,7 +137,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
protected static final String RM_AUDIT_SNIPPET_CHANGES = "/changes";
protected static final String RM_AUDIT_SNIPPET_BEFORE = "/before";
protected static final String RM_AUDIT_SNIPPET_AFTER = "/after";
protected static final String RM_AUDIT_DOCUMENT_LIBRARY_PATH = "/documentLibrary";
protected static final String RM_AUDIT_SITES_PATH = "/Sites";
protected static final String RM_AUDIT_DATA_PERSON_FULLNAME = "/RM/event/person/fullName";
protected static final String RM_AUDIT_DATA_PERSON_ROLES = "/RM/event/person/roles";
@@ -1464,10 +1463,10 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
// we need to strip off the first part of the path
String path = entry.getPath();
String displayPath;
int idx = path.indexOf(RM_AUDIT_DOCUMENT_LIBRARY_PATH);
int idx = path.indexOf(RM_AUDIT_SITES_PATH);
if (idx != -1)
{
displayPath = path.substring(idx + RM_AUDIT_DOCUMENT_LIBRARY_PATH.length());
displayPath = path.substring(idx + RM_AUDIT_SITES_PATH.length());
}
else
{
@@ -1481,7 +1480,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
}
writer.write("</div>\n");
if (entry.getChangedProperties() != null)
if (entry.getChangedProperties() != null && !entry.getChangedProperties().isEmpty())
{
writer.write("<table class=\"changed-values-table\" cellspacing=\"0\">");
writer.write("<tr><th>Property</th><th>Previous Value</th><th>New Value</th></tr>");

View File

@@ -135,7 +135,8 @@ public final class NamePathDataExtractor extends AbstractDataExtractor
{
// Get path from the RM root
List<NodeRef> nodeRefPath = filePlanService.getNodeRefPath(nodeRef);
NodeRef filePlan = filePlanService.getFilePlan(nodeRef);
nodeRefPath.add(0, nodeService.getPrimaryParent(filePlan).getParentRef());
for (NodeRef pathNodeRef : nodeRefPath)
{
String name = (String) nodeService.getProperty(pathNodeRef, ContentModel.PROP_NAME);