I wrote what I thought was a simple script to run in a DXL Layout column. The intent is to simply flag an object if any of it's attributes changed (including Object Text), since the last baseline. |
Re: History since baseline History hr HistoryType ht = hr.type Object obj for (ht in obj) do { if (ht == modifyAttr) { display "Object Changed Since Baseline" } } Chris AnnalSW Test Engineer / DOORS Database AdministratorSensis Corporation, East Syracuse, New Yorkchrisa@sensis.com |
Re: History since baseline
Forget the Compare. You won't be able to use Layout to produce a Filter effect itself (a layout cannot 'reject' the current object without DOORS abort).
// display text flag if object attribute changed since baseline
History hr
HistoryType ht
// Object obj // 'obj' already defined in attr-DXL
string Result = " " // Better than null "" for attr-DXL.
for (hr in obj) do
{ ht = hr.type
if (ht == modifyAttr)
{ Result = "Modified since Baseline"
break // No need to keep looking
}
}
noError()
obj.attrDXLName = Result
lastError()
|
Re: History since baseline llandale - Thu Mar 24 14:31:40 EDT 2011
Forget the Compare. You won't be able to use Layout to produce a Filter effect itself (a layout cannot 'reject' the current object without DOORS abort).
// display text flag if object attribute changed since baseline
History hr
HistoryType ht
// Object obj // 'obj' already defined in attr-DXL
string Result = " " // Better than null "" for attr-DXL.
for (hr in obj) do
{ ht = hr.type
if (ht == modifyAttr)
{ Result = "Modified since Baseline"
break // No need to keep looking
}
}
noError()
obj.attrDXLName = Result
lastError()
For some reason, I still get the following when I try to run what you suggested using a new DXL attribute with that script as it's contents: -E- DXL: <Line:6> syntax error -I- DXL: All done. Errors reported: 1. Warnings reported: 0. This is that "for" loop that was giving me trouble in my script, too. I tried removing the brackets around "hr in obj" (see below) for hr in obj do {... ...but even though I no longer get the error message, I don't see any message flag "Modified since Baseline" in the DXL attribute column either. I DID find an example using the "Browse" button when creating a DXL attribute that does the following: This function sets the attribute it is driving to the number modifications (as history records) that have been made to the object. For my purposes, this will work since any object that had an attribute modified will return "2" - one for the link that was created by the "Compare Modules..." tool and one for the attribute that was modified. I can then filter that column for anything other than "1" and get what I want. I still don't know what syntax error the for loop is causing - I'm using DOORS 9.3.0.2 but thanks a lot for your help. It ultimately led me to the solution that works for me!! :) Chris Annal SW Test Engineer / DOORS Database Administrator Sensis Corporation, East Syracuse, New York chrisa@sensis.com |
Re: History since baseline |
Re: History since baseline llandale - Thu Mar 24 14:31:40 EDT 2011
Forget the Compare. You won't be able to use Layout to produce a Filter effect itself (a layout cannot 'reject' the current object without DOORS abort).
// display text flag if object attribute changed since baseline
History hr
HistoryType ht
// Object obj // 'obj' already defined in attr-DXL
string Result = " " // Better than null "" for attr-DXL.
for (hr in obj) do
{ ht = hr.type
if (ht == modifyAttr)
{ Result = "Modified since Baseline"
break // No need to keep looking
}
}
noError()
obj.attrDXLName = Result
lastError()
Louie,
History hr
HistoryType ht
Module m = current
Date d = null
for hr in m do {
ht = hr.type
if (ht == baselineModule) {
d = hr.date
print stringOf(d) "\n"
break
}
}
|
Re: History since baseline ChrisAnnal - Thu Mar 24 15:14:29 EDT 2011
Hi
History hr
HistoryType ht
Date d = null
Module m = current
for hr in m do {
ht = hr.type
if (ht == baselineModule) {
d = hr.date
break
}
}
if (d == null)
halt
set(attribute("Last Modified On") > stringOf(d))
filtering(on)
|