B2022-148: cannot insert outside transition in a background document that references a related EOP – transition is converted to text
This commit is contained in:
parent
cb4040572c
commit
e045614f8d
@ -1011,6 +1011,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (tran.MyContent.ContentItems[0].MyDocVersion.VersionID != tran.MyItemToID.MyDocVersion.VersionID &&
|
if (tran.MyContent.ContentItems[0].MyDocVersion.VersionID != tran.MyItemToID.MyDocVersion.VersionID &&
|
||||||
(tran.MyContent.ContentItems[0].ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tran.TranType].TransMenu.Contains("Proc") ||
|
(tran.MyContent.ContentItems[0].ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tran.TranType].TransMenu.Contains("Proc") ||
|
||||||
tran.MyContent.ContentItems[0].ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tran.TranType].TransMenu.Contains("other proc")))
|
tran.MyContent.ContentItems[0].ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tran.TranType].TransMenu.Contains("other proc")))
|
||||||
|
{
|
||||||
|
// B2022-148: cannot insert outside transition in a background document that references a related EOP – transition is converted to text
|
||||||
|
bool dvsLinked = DocVersionInfo.Linked(tran.MyItemToID.MyDocVersion, tran.MyContent.ContentItems[0].MyDocVersion);
|
||||||
|
if (!dvsLinked)
|
||||||
{
|
{
|
||||||
string destProcNumber = tran.MyItemToID.MyProcedure.DisplayNumber;
|
string destProcNumber = tran.MyItemToID.MyProcedure.DisplayNumber;
|
||||||
foreach (ProcedureInfo prci in tran.MyContent.ContentItems[0].MyDocVersion.Procedures)
|
foreach (ProcedureInfo prci in tran.MyContent.ContentItems[0].MyDocVersion.Procedures)
|
||||||
@ -1021,6 +1025,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +317,41 @@ namespace VEPROMS.CSLA.Library
|
|||||||
AssociationConfig ac = new AssociationConfig(associationInfo);
|
AssociationConfig ac = new AssociationConfig(associationInfo);
|
||||||
return ac.ROUpdate_LoadingFigures;
|
return ac.ROUpdate_LoadingFigures;
|
||||||
}
|
}
|
||||||
|
#region Enhanced
|
||||||
|
// B2022-148: cannot insert outside transition in a background document that references a related EOP – transition is converted to text
|
||||||
|
// Check if the 2 doc versions are linked, i.e. one is source and the other is enhanced linked to the source
|
||||||
|
public static bool Linked(DocVersionInfo dv1, DocVersionInfo dv2)
|
||||||
|
{
|
||||||
|
DocVersionConfig dvc1 = dv1.DocVersionConfig;
|
||||||
|
DocVersionConfig dvc2 = dv2.DocVersionConfig;
|
||||||
|
bool isLinked1 = dvc1 != null && (dvc1.MyEnhancedDocuments != null && dvc1.MyEnhancedDocuments.Count > 0);
|
||||||
|
bool isLinked2 = dvc2 != null && (dvc2.MyEnhancedDocuments != null && dvc2.MyEnhancedDocuments.Count > 0);
|
||||||
|
bool relatedEnh = false;
|
||||||
|
if (isLinked1 && isLinked2)
|
||||||
|
{
|
||||||
|
// does source point to this docversion as enhanced, and does this enhanced point to this source:
|
||||||
|
bool isSource1 = dvc1.MyEnhancedDocuments.Count == 1 && dvc1.MyEnhancedDocuments[0].Type == 0 && dvc1.MyEnhancedDocuments[0].VersionID == dv2.VersionID;
|
||||||
|
bool isSource2 = dvc2.MyEnhancedDocuments.Count == 1 && dvc2.MyEnhancedDocuments[0].Type == 0 && dvc2.MyEnhancedDocuments[0].VersionID == dv1.VersionID;
|
||||||
|
if (isSource1 || isSource2)
|
||||||
|
{
|
||||||
|
int sourceVersionID = isSource1 ? dv1.VersionID : dv2.VersionID;
|
||||||
|
DVEnhancedDocuments enhList = isSource1 ? dvc2.MyEnhancedDocuments : dvc1.MyEnhancedDocuments;
|
||||||
|
if (enhList != null)
|
||||||
|
{
|
||||||
|
foreach (DVEnhancedDocument ded in enhList)
|
||||||
|
{
|
||||||
|
if (ded.Type != 0 && ded.VersionID == sourceVersionID) // found it.
|
||||||
|
{
|
||||||
|
relatedEnh = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return relatedEnh;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#region SearchPaths
|
#region SearchPaths
|
||||||
public string _SearchDVPath;
|
public string _SearchDVPath;
|
||||||
public string SearchDVPath
|
public string SearchDVPath
|
||||||
|
@ -910,6 +910,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (tran.MyContent.ContentItems[0].MyDocVersion.VersionID != tran.MyItemToID.MyDocVersion.VersionID &&
|
if (tran.MyContent.ContentItems[0].MyDocVersion.VersionID != tran.MyItemToID.MyDocVersion.VersionID &&
|
||||||
(tran.MyContent.ContentItems[0].ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tran.TranType].TransMenu.Contains("Proc") ||
|
(tran.MyContent.ContentItems[0].ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tran.TranType].TransMenu.Contains("Proc") ||
|
||||||
tran.MyContent.ContentItems[0].ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tran.TranType].TransMenu.Contains("other proc")))
|
tran.MyContent.ContentItems[0].ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tran.TranType].TransMenu.Contains("other proc")))
|
||||||
|
{
|
||||||
|
// B2022-148: cannot insert outside transition in a background document that references a related EOP – transition is converted to text
|
||||||
|
bool dvsLinked = DocVersionInfo.Linked(tran.MyItemToID.MyDocVersion, tran.MyContent.ContentItems[0].MyDocVersion);
|
||||||
|
if (!dvsLinked)
|
||||||
{
|
{
|
||||||
string destProcNumber = tran.MyItemToID.MyProcedure.DisplayNumber;
|
string destProcNumber = tran.MyItemToID.MyProcedure.DisplayNumber;
|
||||||
foreach (ProcedureInfo prci in tran.MyContent.ContentItems[0].MyDocVersion.Procedures)
|
foreach (ProcedureInfo prci in tran.MyContent.ContentItems[0].MyDocVersion.Procedures)
|
||||||
@ -920,6 +924,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user