IBM DOORS - 基于属性更新需求

问题描述

您好,DOORS 中有一个模块可满足客户要求,但现在我收到了一个新的 PDF 文件,其中包含更新/新要求。我能够将 PDF 文件转换reqif 并使用公司的内部工具创建一个新模块。

然后我如何将两个模块合并到一个基于指定属性的模块中,该属性包含两个模块上的唯一 ID。

模块 A:

  • 全局 ID 1
  • 全局 ID 2

模块 B:

模块 C (A+B):

  • 全局 ID 1
  • 全局 ID 2 - 另一个属性中的新信息
  • 全局 ID 4

解决方法

我假设除了另一个属性中的新信息外,两个模块之间的其余信息都是相同的。 以下脚本使用新模块新信息更新当前模块

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"
}
}

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...