Closed krishtej23 closed 1 year ago
I could retrieve the document at a specific revision as follows:
projObj = polarion.getProject(project ID)
module = polarion.getModuleByUri(uri+'%'+12345)
. This loads the module at the specific revision. Final uri becomes subterra:data-service:objects:/default/Polarion project projectID prefix XYZ${Module}{moduleFolder}SpaceName#documentID%12345
module.id
will be None
. This can be checked for revision validity.workitem_uri_list = polarion.getModuleWorkItemUris(module.uri, title_uri, True)
. title_uri
is the heading work item under which work items need to be retrieved.Closing this issue, as this solution works.
Hi Jesper,
I have been trying to get the document at a specific revision. I tried to use
getModuleByLocation(project ID, location)
function documented by Polarion here. Polarion documentation saysUse the location with a revision set to retrieve a particular revision of the Module/Document.
I used the following steps but with no luck.projObj = polarionServices.getProject(project ID)
module = polarionServices.getModuleByUri(uri)
doc2 = projectObj.getDocument(module.location+":1234")
. The location here isdefault:/repo/projectID/modules/SpaceName/DocumentID/module.xml
Exception: Cannot find the document at location default:/repo/projectID/modules/SpaceName/DocumentID/module.xml:1234 in project projectID
. I tried different ways of adding version to the location and always end up in error.?revision=12345
. I get the same error:Exception: Cannot find the document at location default:/repo/projectID/modules/SpaceName/DocumentID/module.xml?revision=12345 in project projectID
doc = polarionServices.getModuleByLocation(projectObj, module.location)
. URI in the doc object is only filled as:subterra:data-service:objects:/default/Polarion project projectID prefix XYZ${Module}{moduleFolder}documentID#module.xml
and all other attributes areNone
.doc = polarionServices.getModuleByLocation(projectObj, module.location+"?revision=1234")
. URI in the doc object is only filled with revision as:subterra:data-service:objects:/default/Polarion project projectID prefix XYZ${Module}{moduleFolder}documentID#module.xml?revision=1234
and all other attributes areNone
.Is there a way to retrieve a document at the specific revision?