Nested Work Item List in Wiki Page

Description
ajaywazir
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

Hi
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.
Regards
Ajay Wazir

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

Re: Nested Work Item List in Wiki Page

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

Hi!

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($query="id:$WInr")
 #set($WIs=$trackerService.queryWorkItems($query, "id"))
 #foreach ($wi in $WIs)
    {table}
    Workitem | Title
    #foreach ($link in $wi.getLinkedWorkItemsStructsBack("id") )
        #if ($link.getLinkRole().id==$LinkRole)
            #set($linkeditem=$link.getLinkedItem())
            {workitem:$linkeditem.project.id/$linkeditem.id|display=short} | $linkeditem.title
        #end ##if
    #end ##foreach
    {table}
 #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: No registered users and 8 guests