RDNG gives pop up to save modified artifacts indefinite times
I have created a javascript extension which runs over a module level for all artifacts in it. It programatically checks for square bullets and convert them to round bullets and saves artifact. After running the extension RDNG gives popup for indefinite time saying artifact has been modified. Can anyone please help on this.
Thanks in Advance!!!
One answer
Hi Vishakha,
I had similar issue in one of my projects too. Without seeing you code it is difficult to say where you problem is.
Following code is working fine.
// Reset process attributes on all artifacts in a module resetProcessState(module){ RM.Data.getContentsStructure(module, function(result){// Build up data to save here var toSave = []; // For each artifact in the module, reset process attributes result.data.forEach(function(item){ // Create a new ArtifactAttributes object to contain the update data var artifactAttributes = new RM.ArtifactAttributes(); var attributeValues = new RM.AttributeValues(); artifactAttributes.ref = item; artifactAttributes.values = attributeValues; // Reset some attribute values attributeValues['Status']=null; attributeValues['Risk']=null; toSave.push(artifactAttributes); }); // Perform a bulk save of all attributes RM.Data.setAttributes(toSave, function(result){ if(result.code = RM.OperationResult.OPERATION_OK) { // error handling code here } });
}); }