Problem
Mehrere Werte in einem Current Modul sollen auf ihre Werte in der letzten Baseline zurückgesetze werden.
Ansatz
* Einlesen der letzen Baseline.
* Filterung der betroffenen Objekte
** Hier Bsp. h.newValue==“Internal“ && h.attrName == „BB_Type“ && h.author==“karpbjde“ && h.date „“==“03/27/15 11:33:58“
Lösung
History h;
Module m = current;
Object o, baselineObject;
// Anstelle von getMostRecentBaseline(m) kann die Baseline auch definiert werden
Baseline b = getMostRecentBaseline(m)
Module mostRecentBaseline = load(m, b, false)
for baselineObject in mostRecentBaseline do
{
for h in baselineObject do
{
HistoryType hisType = h.type;
if(hisType==modifyObject)
{
if(h.newValue=="Internal" && h.attrName == "BB_Type" && h.author=="karpbjde" && h.date ""=="03/27/15 11:33:58")
{
for o in m do
{
if(identifier(baselineObject) "" == identifier(o) "")
{
print "Set " identifier(baselineObject) "\t" h.author "\t" h.date " to " h.oldValue "\n";
o."BB_Type" = h.oldValue;
break;
}
}
}
}
}
}