This commit is contained in:
2020-05-03 14:45:57 +00:00
parent c678d4636c
commit 8d2267366f

View File

@@ -415,15 +415,7 @@ namespace AyaNova.PlugIn.V8
Tagit(cert.UserCertificationID, tags);
}
SetTags(d, tags);
// wiki
var hasWiki = WikiPage.HasWiki(c.ID);
if (hasWiki)
{
// await ExportAttachments(ObjectTID, progress);
d.wiki = GetWikiContent(ObjectTID);
}
//Custom fields?
if (ShouldExportCustom)
d.customFields = CustomFieldData(c, DateCustomFields);
@@ -450,17 +442,31 @@ namespace AyaNova.PlugIn.V8
//Attachments / FILES
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
string NonFileUrls = await ExportDocs(ObjectTID, c.Docs, progress);
if (!string.IsNullOrEmpty(NonFileUrls))
{
//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;
await util.PutAsync("User/" + RavenId.ToString(), d.ToString());
repost = true;
}
if (repost)
await util.PutAsync("User/" + RavenId.ToString(), d.ToString());
//-----
}
@@ -760,8 +766,8 @@ namespace AyaNova.PlugIn.V8
var DateCustomFields = await ExportCustomFieldSchema(ocf, ObjectTypeName, RavenObjectName);
//Step 2: export the objects
PartPickList pl=PartPickList.GetAllParts();
// PickListAutoComplete pl = PickListAutoComplete.GetList("**", "loanitem");
PartPickList pl = PartPickList.GetAllParts();
// PickListAutoComplete pl = PickListAutoComplete.GetList("**", "loanitem");
progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s");
foreach (PartPickList.PartPickListInfo i in pl)
@@ -778,7 +784,7 @@ namespace AyaNova.PlugIn.V8
progress.Op(ObjectTypeName + " " + d.name);
d.active = c.Active;
d.notes = c.Notes;
SetTags(d, tags);
var hasWiki = WikiPage.HasWiki(c.ID);
@@ -906,9 +912,9 @@ namespace AyaNova.PlugIn.V8
dynamic d = new JObject();
d.name = c.PONumber.ToString();
progress.Op(ObjectTypeName + " " + d.name);
// d.active = c.Active;
// d.active = c.Active;
d.notes = c.Notes;
// Tagit(c.RegionID, tags);
// Tagit(c.RegionID, tags);
SetTags(d, tags);
var hasWiki = WikiPage.HasWiki(c.ID);
@@ -956,10 +962,10 @@ namespace AyaNova.PlugIn.V8
var DateCustomFields = await ExportCustomFieldSchema(ocf, ObjectTypeName, ObjectTypeName);
//Step 2: export the objects
PickListAutoComplete pl = PickListAutoComplete.GetList("**", "unit");
UnitPickList pl = UnitPickList.GetListOfAll();
progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s");
foreach (PickListAutoComplete.PickListAutoCompleteInfo i in pl)
foreach (UnitPickList.UnitPickListInfo i in pl)
{
if (!progress.KeepGoing) return;
List<string> tags = new List<string>();
@@ -973,9 +979,9 @@ namespace AyaNova.PlugIn.V8
progress.Op(ObjectTypeName + " " + d.name);
d.active = c.Active;
d.notes = c.Notes;
// Tagit(c.RegionID, tags);
// Tagit(c.RegionID, tags);
SetTags(d, tags);
var hasWiki = WikiPage.HasWiki(c.ID);
if (hasWiki)
{