B2017-060 the update of RO usages of an imported procedure, if RO was not found in the ROUsage table, the import would be aborted instead of converting the invalid RO to text

B2017-060 the update of RO usages of an imported procedure, if RO was not found in the ROUsage table, the import would be aborted instead of converting the invalid RO to text.
Part of B2017-060 fix were we need to prevent the content text from being disposed when Item is used in a Using statement.
This commit is contained in:
2017-03-24 14:29:39 +00:00
parent 95d7cbbf98
commit 8b5e7e01ad
4 changed files with 68 additions and 30 deletions

View File

@@ -753,6 +753,7 @@ namespace VEPROMS.CSLA.Library
oldText = content.ConvertROToText(rousage, roval, roch.type, rofstinfo);
using (Item myitem = content.ContentItems[0].MyItem) // so that myitem does not stay in cache B2016-153
{
myitem.DisposeOfContent = false; // don't dispose of the contents may be needed if more than one RO needs processed - part of B2017-060
// B2016-225 (follow through) added more descriptive Annotation Type when RO is converted to text
Annotation.MakeAnnotation(myitem, AnnotationType.GetByNameOrCreate("Link Converted To Text"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(oldText)), null);
}
@@ -795,6 +796,7 @@ namespace VEPROMS.CSLA.Library
oldText = content.ConvertROToText(rousage, roval, roch.type, rofstinfo);
using (Item myitem = content.ContentItems[0].MyItem) // so that myitem does not stay in cache B2016-153
{
myitem.DisposeOfContent = false; // don't dispose of the contents may be needed if more than one RO needs processed - part of B2017-060
// B2016-225 (follow through) added more descriptive Annotation Type when RO is converted to text
Annotation.MakeAnnotation(myitem, AnnotationType.GetByNameOrCreate("Link Converted To Text"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(oldText)), null);
}