DXL DOORS从特定的历史版本中检索红线 [英] DXL DOORS Retrieve Redlines from Specific History Version
问题描述
我想知道是否可以使用DXL从DOORS中特定历史版本中的特定修改中仅检索到红线?
I am wondering if it is possible to retrieve only the redlines from a specific modification in a specific history version in DOORS using DXL?
特别是,我希望脚本检索由当前用户添加或删除的最新一组外部链接.
Specifically, I want a script to retrieve the most recent set of out-links added or removed by the current user.
伪代码可能看起来像这样:
Psuedo-code might look like this:
// Loop through all displayed objects in the current module
for o in m do {
// Loop through all baseline histories (no need to display baseline)
for currHistory in o do {
// If out-links were added/removed in this history version
// break the loop because we only want the most recent version
if ( Out-Links Were Added/Removed ) break loop
}
// Loop through all modifications in the current history verision
for modification in currHistory do {
// True if this modification was made by the current user
if (modification.Author == Current User) {
// True if Out-Link was added
if (modification == Added Out-Link) {
print "Link Added: " The_Link "\n"
}
// True if Out-Link was removed
elseif (modification == Removed Out-Link) {
print "Link Removed: " The_Link "\n"
}
}
}
}
像这样的事情有可能吗?如果是这样,我将如何处理?
Is something like this even possible? If so, how would I go about it?
推荐答案
让我确保我理解您的问题-您想查看用户是否已在模块的特定版本中添加或删除了链接-我假设使用特定历史版本"是指可以与基准和/或模块的当前版本相比较的内容.
Let me make sure I understand your question- you want to see if a user has added or removed links in a specific version of a module - I assume by 'specific history version' you mean something comparable to a baseline and/or current version of a module.
这有可能吗-绝对.
我该怎么做:
// Loop Through Objects
Object o
Module m = current
User u = find()
string uName = u.name
for o in m do {
// Loop through history records
History hr
for hr in o do {
HistoryType ht = hr.type
// Check if link creation / deletion and history record author matches current user
if ( ( ( ht == createLink ) || ( ht == deleteLink ) ) && ( uName == hr.author ) ) {
print goodStringOf ( ht ) ":\n"
print "Source Object: " hr.sourceAbsNo "\n"
}
}
}
注意!这只会处理出站链接(在相应的源模块中可以找到入站创建的历史记录)
Note! This will only handle out-links (history records of in-link creation would be found in the respective source module)
如果需要,您还可以获取其他历史记录(hr)属性,例如日期.
There are other history record (hr) attributes you could grab, like the date, if desired.
有帮助吗?
这篇关于DXL DOORS从特定的历史版本中检索红线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!