Nested Work Item List in Wiki Page

Posts: 8
Joined: Fri Sep 12, 2008 4:45 am

Nested Work Item List in Wiki Page

Postby ajaywazir » Wed Jun 29, 2011 10:57 am

In Polarion 2010 ALM pro
is there a way to list workitems and linked workitems in a nested format (as in the workitem query window - direction impact)?
in a wiki page.
Ajay Wazir

Posts: 12
Joined: Fri Nov 19, 2010 9:35 am
Location: Austria

Re: Nested Work Item List in Wiki Page

Postby Zwi_B&R » Fri Jul 01, 2011 8:16 am


I'm not sure what you want to do, but maybe following example might help you.
It builds a table with all backlinked workitems (with specified link role; sorted by "id").
Example Call: #WIlistLinked("TEST-123" "depends_on")

Code: Select all

##--- macro to build a table of linked workitems (for document overview) --------------------------
#macro( WIlistLinked $WInr $LinkRole)
 #set($WIs=$trackerService.queryWorkItems($query, "id"))
 #foreach ($wi in $WIs)
    Workitem | Title
    #foreach ($link in $wi.getLinkedWorkItemsStructsBack("id") )
        #if ($link.getLinkRole().id==$LinkRole)
            {workitem:$$|display=short} | $linkeditem.title
        #end ##if
    #end ##foreach
 #end ##foreach
#end ##macro

Note: the wiki sometimes has troubles with the syntax; e.g. if you have an #if .. #end in the last column. In this case you have to use html syntax which should always work.

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: ArthurFLITA, Google [Bot] and 14 guests