[ 
https://jira.nuxeo.com/browse/NXP-8594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=110023#comment-110023
 ] 

Antoine Taillefer commented on NXP-8594:
----------------------------------------

Several refactorings have been done:

* The {{PropertyDiff}} object now holds a {{propertyType}} attribute, to be 
chosen among the string constants defined in 
{{org.nuxeo.ecm.platform.diff.model.PropertyType}} ("string", "boolean", 
"date", "integer", "long", "double", "binary", "content", "complex", 
"scalarList", "complexList").
This {{propertyType}} is set depending on the property's {{type}} attribute 
(cf. https://jira.nuxeo.com/browse/NXP-8595) in the document XML export.
It allows us to know what kind of differ we will have to use when displaying  
the property diff result.

* To display the diff, we now use:
** The compared documents to get their properties by using 
({{doc.getProperty(schema, field)}}), instead of using the {{control}} and 
{{test}} values from the {{Difference}} object.
** The property diff to now _how_ to display the diff result depending on the 
property's type and _which part_ of the property is different between the left 
or right doc.
For instance, on a complex property, the property diff allows us to know on 
which specific sub field a difference was detected.
On a string property, the property diff will allow us to highlight the specific 
parts of the text that have been added / removed, and to display a nice 
representation of the actual differences (cf. 
https://jira.nuxeo.com/browse/NXP-8589 for later work to be done).

* Bug fixes:
** Comparing complex list properties with different number of items no more 
crashes.
** Comparing documents with different schemas (for example a _Note_ and a 
_File_) no more crashes: only the common schemas are take into account for the 
diff.

> Refactor to take advantage of a nicer XML export and fix remaining bugs
> -----------------------------------------------------------------------
>
>                 Key: NXP-8594
>                 URL: https://jira.nuxeo.com/browse/NXP-8594
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Sub-task
>            Reporter: Antoine Taillefer
>            Assignee: Antoine Taillefer
>   Original Estimate: 3 days
>  Remaining Estimate: 3 days
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to