Function getLinkedWorkItemsStructsDirect()

Description
Harou33
Posts: 10
Joined: Wed Apr 04, 2018 10:40 am

Function getLinkedWorkItemsStructsDirect()

Postby Harou33 » Tue Jun 12, 2018 12:34 pm

Hello,

I wrote a scrpit, which should return a linked workitem with specified role and also a module/document name from.
When I use

Code: Select all

 $wi.getLinkedWorkItemsStructsBack()
I receive what I want, but when I use

Code: Select all

$wi.getLinkedWorkItemsStructsDirect()
I receive an error (Wrapped Exception: Invocation of method 'getModule' in class com.polarion.alm.tracker.internal.model.WorkItem threw exception class com.polarion.platform.persistence.UnresolvableObjectException : uri: subterra:data-service:objects:...).

This is a code:

Code: Select all


#set($WIs=$trackerService.queryWorkItems($query, "id"))   
#foreach($wi in $WIs)

        #foreach($link in $wi.getLinkedWorkItemsStructsDirect())
               
                #if($link.getLinkRole().id == "satisfies")
               
                   
                    #set($linked = $link.getLinkedItem())
                 
                       $wi.id 
                       FROM
                       <b>$wi.module.id</b>
                       <b>SATISFIES </b>   
                       $linked.id
                       $linked.module.id
                       

                #end   
                   
         #end
 #end


Do you know why it is working only in back? Can you see any error? Or should I use other function?

Harou33
Posts: 10
Joined: Wed Apr 04, 2018 10:40 am

Re: Function getLinkedWorkItemsStructsDirect()

Postby Harou33 » Thu Jun 14, 2018 7:44 am

If someone else has also this problem, I find out that this error is a cause of linkage to non-existing workitem.


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 9 guests