Merged 5.2.0 (5.2.0) to HEAD (5.2)

133883 rmunteanu: REPO-1746: Merge fixes for 5.2 GA issues to 5.2.0 branch
      Merged 5.2.N (5.2.1) to 5.2.0 (5.2.0)
         133721 mward: REPO-1636: fixed bug when updating person with aspects/props.
         See https://issues.alfresco.com/jira/browse/REPO-1636?focusedCommentId=495557&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-495557


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@134196 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2017-01-11 10:36:12 +00:00
parent fd6c9b565c
commit e5147104ad
2 changed files with 49 additions and 3 deletions

View File

@@ -583,6 +583,11 @@ public class PeopleImpl implements People
savePersonDescription(person.getDescription(), personNodeRef);
}
// Update custom aspects - do this *before* adding custom properties. The
// addition of custom properties may result in the auto-addition of aspects
// and we don't want to remove them during the update of explicitly specified aspects.
nodes.updateCustomAspects(personNodeRef, person.getAspectNames(), EXCLUDED_ASPECTS);
// Add custom properties
if (person.getProperties() != null)
{
@@ -600,9 +605,6 @@ public class PeopleImpl implements People
return null;
}
});
// Update custom aspects
nodes.updateCustomAspects(personNodeRef, person.getAspectNames(), EXCLUDED_ASPECTS);
return getPerson(personId);
}