Check if a LiveDoc exists - existModule

Description
markb101
Posts: 1
Joined: Mon May 09, 2016 1:37 pm

Check if a LiveDoc exists - existModule

Postby markb101 » Mon May 09, 2016 2:05 pm

Hi,

I would like to test if a LiveDoc exists or not, so was trying to use the 'existModule' from IModuleManager.


Code: Select all

## SETUP PROJECT ID
#set ($trackerProject = $trackerService.getTrackerProject($page.getSpace().getProjectId()))
 
#set($target_doc_loc_name = "00_SPACE_LOCATION_NAME/Test_doc")

#set ($DocLocation = $trackerProject.location.getLocation($target_doc_loc_name ))
#set($doc_present = $moduleManager.existModule($trackerProject, $DocLocation))



Unfortunately I cannot get the expected output, $doc_present only ever returns false even if the document is present.

Is there any obvious user error in the above code, or my assumptions in creating it (that existModule can be used on Livedocs)? I am already using $moduleManager.duplicate sucessfully, and this uses almost identical arguments -

Code: Select all

IModule duplicate(IModule source,
                IProject targetProject,
                ILocation targetLocation,...

vs

Code: Select all

boolean existModule(IProject project,
                  ILocation location)


Thanks

Mark

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 7 guests