I need to change the type of arond 600 work items however...
1) ...In the Polarion Web UI, the "Change type to:" button is not visible when bulk editing
2) ... the API has also not allowed me to change the type of a work item, any work item on which I invoked setType() threw an exception when passing it to the updateWorkItem method of TrackerWebService.
3) Invoking setType in a Wikipage did not do anything. The following code does nothing, either with endTx or commitTx at the end:
Code: Select all
#set($rootLevelQuery = "project.id:$projectID AND id:XYZ-1234" )
#set($sortingParameter = "title") ## for ordering the query result
#set($rootLevelItems = $trackerService.queryWorkItems($rootLevelQuery, $sortingParameter) )
#foreach($rootItem in $rootLevelItems) ## start foreach1
$rootItem.setType( $project.getWorkItemTypeEnum().wrapOption("typeToGO") )
It does not even return an error message. However it complains when I omit the transactionService stuff.
What I also had in mind is to the get the necessary type object (of a work item which is of the type to which I want to change the around 600 items) through getType() and then insert this object with setType() in the work items needed but it had the same result.
Hence, which option do I have left? I do not wanna click through 600 items one by one.