DOORS NG bulk attribute type changes
Is there an easy way to bulk changes to types in DOORS NG 5.0.2.
We will be REQIF imports to DOORS NG and these imports will have some 3000 objects per module so manually changing their types 100 elements at a time through the GUI is not practical. I would assume that it could be done with an extension however can not see how for the moment. Any assistance appreciated Peter |
One answer
Here a proposal:
1) create a view from the imported artifacts (e.g. filter by Folder, ...)
2) in the views context menu you can create a collection
3) then you can use an extension, which allows to get all artifacts from a collection (or module): RM.Data.getContentsAttributes
function processAllArtifacts(attribute-to-change, new_vlue) {
// array of attributes to manipulate
var attributes = [RM.Data.Attributes.IDENTIFIER];
attributes.push(attribute-to-change);
// get current module or collection
RM.Client.getCurrentArtifact(function(collectionResult) {
if (collectionResult.code === RM.OperationResult.OPERATION_OK) {
var artifactType = collectionResult.data.values[RM.Data.Attributes.FORMAT];
if ((artifactType === RM.Data.Formats.MODULE) || (artifactType === RM.Data.Formats.COLLECTION)) {
var collectionRef = collectionResult.data.ref;
// read attributes of all items in collection
RM.Data.getContentsAttributes(collectionRef, attributes, function(opResult) {
if (opResult.code === RM.OperationResult.OPERATION_OK) {
processAttributes(opResult, attrObj);
}
});
} else {
// error: other type
}
} else {
// collectionResult.message
}
});
};
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.