B2017-083: Missing procedures in enhanced after creating new enhanced procedure from source, if it first procedure in list

This commit is contained in:
Kathy Ruffing 2017-05-17 12:16:53 +00:00
parent d5b0ebc1f9
commit ab44a78d9e

View File

@ -925,6 +925,21 @@ namespace VEPROMS.CSLA.Library
scng = sc.ToString();
}
tmp = NewItemInfoFetch(ItemID, addType, number, text, type, null, null, scng, DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
// B2017-083: first child - adjust the docversion itemid to point to this new one:
if (IsProcedure && tmp != null && tmp.MyPrevious == null)
{
if (this.MyDocVersion != null)
{
using (DocVersion parentItemDV = MyDocVersion.Get())
{
using (Item tmpi = tmp.Get())
{
parentItemDV.MyItem = tmpi;
parentItemDV.Save();
}
}
}
}
}
if (tmp == null) return null;
// if next exists, it is updated in SQL so we have to manually force the iteminfo updates