This commit is contained in:
2020-05-03 14:58:59 +00:00
parent ac53a727d8
commit 8ab96ab1a5

View File

@@ -555,7 +555,7 @@ namespace AyaNova.PlugIn.V8
repost = true; repost = true;
} }
if (repost) if (repost)
await util.PutAsync("User/" + RavenId.ToString(), d.ToString()); await util.PutAsync("Customer/" + RavenId.ToString(), d.ToString());
//----- //-----
//Event log fixup //Event log fixup
@@ -633,7 +633,7 @@ namespace AyaNova.PlugIn.V8
repost = true; repost = true;
} }
if (repost) if (repost)
await util.PutAsync("User/" + RavenId.ToString(), d.ToString()); await util.PutAsync(ObjectTypeName+"/" + RavenId.ToString(), d.ToString());
//----- //-----
//Event log fixup //Event log fixup
@@ -709,7 +709,7 @@ namespace AyaNova.PlugIn.V8
repost = true; repost = true;
} }
if (repost) if (repost)
await util.PutAsync("User/" + RavenId.ToString(), d.ToString()); await util.PutAsync(ObjectTypeName + "/" + RavenId.ToString(), d.ToString());
//----- //-----
//Event log fixup //Event log fixup
@@ -785,7 +785,7 @@ namespace AyaNova.PlugIn.V8
repost = true; repost = true;
} }
if (repost) if (repost)
await util.PutAsync("User/" + RavenId.ToString(), d.ToString()); await util.PutAsync(RavenObjectName + "/" + RavenId.ToString(), d.ToString());
//----- //-----
//Event log fixup //Event log fixup
@@ -863,7 +863,7 @@ namespace AyaNova.PlugIn.V8
repost = true; repost = true;
} }
if (repost) if (repost)
await util.PutAsync("User/" + RavenId.ToString(), d.ToString()); await util.PutAsync(ObjectTypeName + "/" + RavenId.ToString(), d.ToString());
//----- //-----
//Event log fixup //Event log fixup
@@ -938,7 +938,7 @@ namespace AyaNova.PlugIn.V8
repost = true; repost = true;
} }
if (repost) if (repost)
await util.PutAsync("User/" + RavenId.ToString(), d.ToString()); await util.PutAsync(ObjectTypeName + "/" + RavenId.ToString(), d.ToString());
//----- //-----
//Event log fixup //Event log fixup
@@ -979,12 +979,6 @@ namespace AyaNova.PlugIn.V8
// Tagit(c.RegionID, tags); // Tagit(c.RegionID, tags);
SetTags(d, tags); SetTags(d, tags);
var hasWiki = WikiPage.HasWiki(c.ID);
if (hasWiki)
{
d.wiki = GetWikiContent(ObjectTID);
}
//Custom fields? //Custom fields?
if (ShouldExportCustom) if (ShouldExportCustom)
d.customFields = CustomFieldData(c, DateCustomFields); d.customFields = CustomFieldData(c, DateCustomFields);
@@ -996,15 +990,21 @@ namespace AyaNova.PlugIn.V8
//Attachments / FILES //Attachments / FILES
await ExportAttachments(ObjectTID, progress); await ExportAttachments(ObjectTID, progress);
////docs //-----
//string NonFileUrls = await ExportDocs(ObjectTID, c.Docs, progress); bool repost = false;
//if (!string.IsNullOrEmpty(NonFileUrls)) d = rMainObject.ObjectResponse["data"];
//{ // wiki
// //need to repost the object with the notes modified if (WikiPage.HasWiki(c.ID))
// d = rMainObject.ObjectResponse["data"]; {
// d.notes = NonFileUrls + "\n-----------------\n" + d.notes; // await ExportAttachments(ObjectTID, progress);
// await util.PutAsync(ObjectTypeName + "/" + RavenId.ToString(), d.ToString()); d.wiki = GetWikiContent(ObjectTID);
//} repost = true;
}
if (repost)
await util.PutAsync(ObjectTypeName + "/" + RavenId.ToString(), d.ToString());
//-----
//Event log fixup //Event log fixup
await util.EventLog(util.AyaType.PurchaseOrder, RavenId, SafeGetUserMap(c.Creator), SafeGetUserMap(c.Modifier), c.Created, c.Modified); await util.EventLog(util.AyaType.PurchaseOrder, RavenId, SafeGetUserMap(c.Creator), SafeGetUserMap(c.Modifier), c.Created, c.Modified);
@@ -1044,12 +1044,6 @@ namespace AyaNova.PlugIn.V8
// Tagit(c.RegionID, tags); // Tagit(c.RegionID, tags);
SetTags(d, tags); SetTags(d, tags);
var hasWiki = WikiPage.HasWiki(c.ID);
if (hasWiki)
{
d.wiki = GetWikiContent(ObjectTID);
}
//Custom fields? //Custom fields?
if (ShouldExportCustom) if (ShouldExportCustom)
d.customFields = CustomFieldData(c, DateCustomFields); d.customFields = CustomFieldData(c, DateCustomFields);
@@ -1061,15 +1055,32 @@ namespace AyaNova.PlugIn.V8
//Attachments / FILES //Attachments / FILES
await ExportAttachments(ObjectTID, progress); await ExportAttachments(ObjectTID, progress);
//-----
bool repost = false;
d = rMainObject.ObjectResponse["data"];
// wiki
if (WikiPage.HasWiki(c.ID))
{
// await ExportAttachments(ObjectTID, progress);
d.wiki = GetWikiContent(ObjectTID);
repost = true;
}
//docs //docs
string NonFileUrls = await ExportDocs(ObjectTID, c.Docs, progress); string NonFileUrls = await ExportDocs(ObjectTID, c.Docs, progress);
if (!string.IsNullOrEmpty(NonFileUrls)) if (!string.IsNullOrEmpty(NonFileUrls))
{ {
//need to repost the object with the notes modified //need to repost the user with the notes modified
d = rMainObject.ObjectResponse["data"];
d.login = null;
d.password = null;
d.notes = NonFileUrls + "\n-----------------\n" + d.notes; d.notes = NonFileUrls + "\n-----------------\n" + d.notes;
await util.PutAsync(ObjectTypeName + "/" + RavenId.ToString(), d.ToString()); repost = true;
} }
if (repost)
await util.PutAsync(ObjectTypeName + "/" + RavenId.ToString(), d.ToString());
//-----
//Event log fixup //Event log fixup
await util.EventLog(util.AyaType.Unit, RavenId, SafeGetUserMap(c.Creator), SafeGetUserMap(c.Modifier), c.Created, c.Modified); await util.EventLog(util.AyaType.Unit, RavenId, SafeGetUserMap(c.Creator), SafeGetUserMap(c.Modifier), c.Created, c.Modified);