This commit is contained in:
@@ -210,6 +210,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
private async System.Threading.Tasks.Task<long> Getv7v8IdMap(Guid id, RootObjectTypes desiredType, bool allowPatch = true, bool doNotFail = true, long? extraV8Id = null)
|
private async System.Threading.Tasks.Task<long> Getv7v8IdMap(Guid id, RootObjectTypes desiredType, bool allowPatch = true, bool doNotFail = true, long? extraV8Id = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!V7ToV8IdMap.ContainsKey(id))
|
if (!V7ToV8IdMap.ContainsKey(id))
|
||||||
{
|
{
|
||||||
if (!allowPatch && !doNotFail)
|
if (!allowPatch && !doNotFail)
|
||||||
@@ -218,6 +219,8 @@ namespace AyaNova.PlugIn.V8
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
//not found, patch allowed, create a substitute record for it and put it in the map
|
//not found, patch allowed, create a substitute record for it and put it in the map
|
||||||
|
if (id == Guid.Empty)
|
||||||
|
throw new Exception("Error: Getv7v8IdMap (source id: " + id.ToString() + " for type: " + desiredType.ToString() + ") attempt to create substitute record for empty id, this is an unexpected error, please provide full export log to technical support");
|
||||||
await CreateSubstitute(id, desiredType, extraV8Id);
|
await CreateSubstitute(id, desiredType, extraV8Id);
|
||||||
}
|
}
|
||||||
return V7ToV8IdMap[id];
|
return V7ToV8IdMap[id];
|
||||||
@@ -1948,7 +1951,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
d.dateStarted = util.DateToV8(c.DateStarted, true);
|
d.dateStarted = util.DateToV8(c.DateStarted, true);
|
||||||
d.dateCompleted = util.DateToV8(c.DateCompleted, false);
|
d.dateCompleted = util.DateToV8(c.DateCompleted, false);
|
||||||
d.accountNumber = c.AccountNumber;
|
d.accountNumber = c.AccountNumber;
|
||||||
d.projectOverseerId = await Getv7v8IdMap(c.ProjectOverseerID, RootObjectTypes.User);
|
d.projectOverseerId = await Getv7v8IdMapNullOk(c.ProjectOverseerID, RootObjectTypes.User);
|
||||||
TagFromv7Guid(c.RegionID, tags);
|
TagFromv7Guid(c.RegionID, tags);
|
||||||
SetTags(d, tags);
|
SetTags(d, tags);
|
||||||
//Custom fields?
|
//Custom fields?
|
||||||
|
|||||||
Reference in New Issue
Block a user