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

View File

@@ -416,14 +416,6 @@ namespace AyaNova.PlugIn.V8
} }
SetTags(d, tags); SetTags(d, tags);
// wiki
var hasWiki = WikiPage.HasWiki(c.ID);
if (hasWiki)
{
// await ExportAttachments(ObjectTID, progress);
d.wiki = GetWikiContent(ObjectTID);
}
//Custom fields? //Custom fields?
if (ShouldExportCustom) if (ShouldExportCustom)
d.customFields = CustomFieldData(c, DateCustomFields); d.customFields = CustomFieldData(c, DateCustomFields);
@@ -450,17 +442,31 @@ 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 user with the notes modified //need to repost the user with the notes modified
d = rMainObject.ObjectResponse["data"];
d.login = null; d.login = null;
d.password = null; d.password = null;
d.notes = NonFileUrls + "\n-----------------\n" + d.notes; 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); var DateCustomFields = await ExportCustomFieldSchema(ocf, ObjectTypeName, RavenObjectName);
//Step 2: export the objects //Step 2: export the objects
PartPickList pl=PartPickList.GetAllParts(); PartPickList pl = PartPickList.GetAllParts();
// PickListAutoComplete pl = PickListAutoComplete.GetList("**", "loanitem"); // PickListAutoComplete pl = PickListAutoComplete.GetList("**", "loanitem");
progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s"); progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s");
foreach (PartPickList.PartPickListInfo i in pl) foreach (PartPickList.PartPickListInfo i in pl)
@@ -906,9 +912,9 @@ namespace AyaNova.PlugIn.V8
dynamic d = new JObject(); dynamic d = new JObject();
d.name = c.PONumber.ToString(); d.name = c.PONumber.ToString();
progress.Op(ObjectTypeName + " " + d.name); progress.Op(ObjectTypeName + " " + d.name);
// d.active = c.Active; // d.active = c.Active;
d.notes = c.Notes; d.notes = c.Notes;
// Tagit(c.RegionID, tags); // Tagit(c.RegionID, tags);
SetTags(d, tags); SetTags(d, tags);
var hasWiki = WikiPage.HasWiki(c.ID); var hasWiki = WikiPage.HasWiki(c.ID);
@@ -956,10 +962,10 @@ namespace AyaNova.PlugIn.V8
var DateCustomFields = await ExportCustomFieldSchema(ocf, ObjectTypeName, ObjectTypeName); var DateCustomFields = await ExportCustomFieldSchema(ocf, ObjectTypeName, ObjectTypeName);
//Step 2: export the objects //Step 2: export the objects
PickListAutoComplete pl = PickListAutoComplete.GetList("**", "unit"); UnitPickList pl = UnitPickList.GetListOfAll();
progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s"); progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s");
foreach (PickListAutoComplete.PickListAutoCompleteInfo i in pl) foreach (UnitPickList.UnitPickListInfo i in pl)
{ {
if (!progress.KeepGoing) return; if (!progress.KeepGoing) return;
List<string> tags = new List<string>(); List<string> tags = new List<string>();
@@ -973,7 +979,7 @@ namespace AyaNova.PlugIn.V8
progress.Op(ObjectTypeName + " " + d.name); progress.Op(ObjectTypeName + " " + d.name);
d.active = c.Active; d.active = c.Active;
d.notes = c.Notes; d.notes = c.Notes;
// Tagit(c.RegionID, tags); // Tagit(c.RegionID, tags);
SetTags(d, tags); SetTags(d, tags);
var hasWiki = WikiPage.HasWiki(c.ID); var hasWiki = WikiPage.HasWiki(c.ID);