Diffing Workitems with DiffManager?

Description
Zwi_B&R
Posts: 12
Joined: Fri Nov 19, 2010 9:35 am
Location: Austria
Contact:

Diffing Workitems with DiffManager?

Postby Zwi_B&R » Wed Jul 25, 2012 1:16 pm

Hello!
I'm trying to make a wiki page to view differences of 2 workitems or of 2 specific revisions of the same workitem.
I was thinging about using IDiffManager for this, but I couldn't get it working up to now.
From following code:

Code: Select all

#set($wi1=$trackerService.queryWorkItems("id:PLAY-4", "id").get(0))     ## get workitems
#set($wi2=$trackerService.queryWorkItems("id:PLAY-5", "id").get(0))
$wi1.description.content\\         # check workitems
$wi2.description.content

#set($dataSvc = $wi1.getDataSvc())
#set($DiffMan=$dataSvc.getDiffManager())   # get DiffMan
$DiffMan\\                                 # DiffMan exising?
$DiffMan.generateDiff($wi1, $wi2, "title") # try to use DiffMan..

I get this output:
Text from PLAY-4
Text from PLAY-5
com.polarion.platform.persistence.internal.diff.DiffManager@24a5607e
$DiffMan.generateDiff($wi1, $wi2, "title")

It seems that I get a DiffMan object, but can't use the method (or pass wrong arguments).
Does anyone have expirience with this?
I was hoping to get some kind of output like the history view of a workitem (but not with the limitation that it always compares 2 consecutive reisions of the same workitem).

Especially comparing 2 specific revisions of a workitem would be very convenient for our review process (history view is not, because the workitem might have been saved a lot of times since the last review...)

NickEntin
Posts: 472
Joined: Tue Oct 24, 2006 10:27 am
Location: Polarion Software GmbH, Stuttgart
Contact:

Re: Diffing Workitems with DiffManager?

Postby NickEntin » Thu Jul 26, 2012 6:30 am

Hi,

I'm not sure this interface is so easily usable as you expect, but the call you've triggered doesn't exist in the interface, therefore Velocity renders whole call as a string.
Please notice that generateDiff method has 3rd parameter java.util.Set, not String.

Best regards,
Nick

dejavu030507
Posts: 3
Joined: Mon Apr 16, 2018 6:42 am

Re: Diffing Workitems with DiffManager?

Postby dejavu030507 » Wed Apr 18, 2018 10:18 am

Hi,
Please notice that generateDiff method has 3rd parameter java.util.Set, not String.
How can I type a java.util.Set in wikipage?

Thanks.


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 7 guests