I'm creating a view on some linked work items, and create a nice table out of that.
But I want to be able to create a compare view on my custom wiki generated content, just like what is possible in the document compare functionality.
Just starting on this compare view, and starting small:
I managed to request the change within a work item by the following:
Code: Select all
#set($wiOld=$trackerService.getWorkItemWithRevision("MLR", "MLR-599", "78839"))
#set($DiffMan = $wiLatest.getDataSvc().getDiffManager())
#set($excludeFields = $objectFactory.newSet())
#set($fieldDiffs = $DiffMan.generateDiff($wiOld, $wiLatest, $excludeFields))
#foreach($diff in $fieldDiffs)
* field: $diff.getFieldName()
** before: $diff.getBefore()
** after: $diff.getAfter()
But now I want to get a nice view on the changed data as well (green highlighting for new text, red highlighting for removed text). Just like what is present in the LiveDoc compare functionality:
What manager-object can I use for rendering the compare? The DiffManager only allows me to to a compare, but it does not allow me to render it in a usable way.
Any help is appreciated. Thnx.