Fixes to code to generate annotations for transitions with missing destinations. If more than one transitions with a missing destination point to the same destination, the first one would get an annotation.

Replace Outside Transitions with text if the source data is missing.
This commit is contained in:
Rich 2009-10-24 03:05:14 +00:00
parent 58ac63bfe6
commit 4ce64de76c

View File

@ -85,8 +85,11 @@ namespace DataLoader
toItem = tmp.Get();
else
{
toItem = Item.New(null, TransDummyCont, DateTime.Now, "Migration");
migrationErrors.Add("Transition Error: Missing Data - "+_OutTran.GetDescription(thekey));
//toItem = Item.New(null, TransDummyCont, DateTime.Now, "Migration");
fromCon.Save();
migrationErrors.Add("Transition Error: Missing Data - " + _OutTran.GetDescription(thekey) + ". Converted to text");
_ContentMigrationErrors.Add(fromCon.ContentID, migrationErrors);
return _OutTran.GetTransitionText(thekey);
}
toItem2 = toItem;
// the 32-bit program will no longer have a special type for outside transitions - make it a
@ -98,12 +101,16 @@ namespace DataLoader
if (dicTrans_ItemDone.ContainsKey(thekey))
{
toItem = dicTrans_ItemDone[thekey];
if (toItem.ContentID == TransDummyCont.ContentID)
_TransitionMigrationErrors.Add(thekey);
}
else
{
if (dicTrans_ItemIds.ContainsKey(thekey))
{
toItem = dicTrans_ItemIds[thekey];
if (toItem.ContentID == TransDummyCont.ContentID)
_TransitionMigrationErrors.Add(thekey);
}
else
{
@ -124,17 +131,22 @@ namespace DataLoader
if (dicTrans_ItemDone.ContainsKey(thekey2))
{
toItem2 = dicTrans_ItemDone[thekey2];
if (toItem2.ContentID == TransDummyCont.ContentID)
_TransitionMigrationErrors.Add(thekey2);
}
else
{
if (dicTrans_ItemIds.ContainsKey(thekey2))
{
toItem2 = dicTrans_ItemIds[thekey2];
if (toItem2.ContentID == TransDummyCont.ContentID)
_TransitionMigrationErrors.Add(thekey2);
}
else
{
toItem2 = Item.MakeItem(null, TransDummyCont, DateTime.Now, "Migration");
dicTrans_ItemIds.Add(thekey2, toItem2);
_TransitionMigrationErrors.Add(thekey2);
}
}
}