问题描述
您好,DOORS 中有一个模块可满足客户要求,但现在我收到了一个新的 PDF 文件,其中包含更新/新要求。我能够将 PDF 文件转换为 reqif 并使用公司的内部工具创建一个新模块。
然后我如何将两个模块合并到一个基于指定属性的模块中,该属性包含两个模块上的唯一 ID。
模块 A:
- 全局 ID 1
- 全局 ID 2
模块 B:
模块 C (A+B):
解决方法
我假设除了另一个属性中的新信息外,两个模块之间的其余信息都是相同的。 以下脚本使用新模块新信息更新当前模块
Module m = current
Object ob,ob1
ModName_ mod = module "full path of new module here"
Module m1 = read(fullName(mod),false)
for ob in m do
{
int objID = intOf(ob."Absolute Number""")
ob1 = object(objID,m1)
if(ob."Attribute Name" != ob1."Attribute Name") //If new info in another attribute
{
ob."Attribute Name" = ob1."Attribute Name"
}
}
,
我根据你的评论修改了脚本
Module m = current
Object ob,m1)
if((ob."Object Heading" != ob1."Object Heading") || (ob."Object Text" != ob1."Object Text"))
{
ob."Object Heading" = ob1."Object Heading"
ob."Object Text" = ob1."Object Text"
}
}