As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi ,
Audit trails for some property names getting null for OOB model, written condition for checking properties using dictionaryServices but not getting properties names. I wrote substring condition for getting name with property definition. find the Java snippet:
Map propMap = (Map) o; propMap.forEach((k, v) -> { if (dictionaryService.getProperty((QName) k) != null) {
cell.append(dictionaryService.getProperty((QName) k).getTitle(dictionaryService) + " = " + v + "\n"); } else { cell.append(k.toString().substring(k.toString().lastIndexOf("}") + 1, k.toString().length()) + v + "\n"); } });
Mainly getting issue when I clicked document for edit offline at that time for some properties getting null. Find the below pictures for the issue:
Some properties are defined without a Title value in the Data Dictionary.
In this case, Working Copy Label property has no title defined:
https://github.com/Alfresco/alfresco-repository/blob/d8f828324419f101d6e1f7a19020864d801b3b64/src/main/resources/alfresco/model/contentModel.xml#L990
You can include alternatively the Name instead of the Title.
Title attribute of property is not mandatory in content model of alfresco.So when you retrieve title of a property which does not exist , than it will return null.
cell.append(dictionaryService.getProperty((QName) k).getTitle(dictionaryService) + " = " + v + "\n");
You need to put if condition for title as well, If title is null than you can display the QNAME as it is or may be something else.