是否可以使用dxl脚本(DOORS)为文件夹中的每个模块创建基线? [英] Is it possible to create a baseline for each module in a Folder using a dxl script (DOORS)?
问题描述
我需要为文件夹中的每个模块创建一个首次发布"基准,但是我不知道是否可能.至少可以每次为一个模块创建一个基线吗?
提前谢谢
是的,很简单.
我假设您基本上了解如何编写DXL脚本,所以这里只是主要部分.始终可以在DXL手册或DXL的developerWorks论坛中找到详细信息和示例( 您没有写模块是仅在一个文件夹中,还是必须递归遍历该文件夹.假设没有递归.
因此,现在您的代码将遍历该文件夹.这是通过
Itam iCurrent
for iCurrent in fStart do {
if (type iCurrent == "Formal") {
myCreateBaselineForModule(module iCurrent)
}
}
最后,您将需要创建基线. 假设您要创建不带后缀的主版本,请确保当前没有打开任何模块或未保存更改,并且您具有足够的访问权限,代码就是
void myCreateBaselineForModule (Module mod) {
create (mod, nextMajor(), "")
}
I need to create a "First Release" baseline for each module in a Folder, but I dont know if it is possible. Is, at least, possible to create a baseline for a one module each time?
Thank you in advance
yes, it is quite straight forward. I assume that you basically know how to write DXL scripts, so here are just the main parts. Details and examples can always be found in the DXL manual or in the developerWorks forum for DXL (http://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000001527)
Your program will mainly consist of a loop that traverses all modules in a folder. Your starting point will be
Folder fStart = folder "/project/myfolder/mysubfolder"
You did not write whether your modules are in one folder only or whether you have to recursively traverse the folder. Assuming no recursion. So, now your code will loop through the folder. This is done via
Itam iCurrent
for iCurrent in fStart do {
if (type iCurrent == "Formal") {
myCreateBaselineForModule(module iCurrent)
}
}
Finally you will need to create a baseline. Assuming you want to create a major version without suffix you are sure that no module is currently open or has unsaved changes and you have enough access rights, the code would simply be
void myCreateBaselineForModule (Module mod) {
create (mod, nextMajor(), "")
}
这篇关于是否可以使用dxl脚本(DOORS)为文件夹中的每个模块创建基线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!