diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 5e9527e..6d66fbc 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -250,23 +250,14 @@ namespace AyaNova.PlugIn.V8 if (progress.KeepGoing) ExportUserCertifications(progress); - progress.Op("Exporting objects"); + progress.Op("Exporting Business objects"); //BIZ objects - - //if (progress.KeepGoing) - // await ExportLocales(progress); - - if (progress.KeepGoing) - await ExportUsers(progress); - - - if (progress.KeepGoing) - await ExportClients(progress); - + await ExportLocales(progress); + await ExportUsers(progress); + await ExportClients(progress); //NOTE: when get to PRIORITY, or WORKORDER STATUS be sure to add color code as per already done in USER export - if (progress.KeepGoing) { progress.Append("Export completed"); @@ -307,12 +298,13 @@ namespace AyaNova.PlugIn.V8 #region users private async System.Threading.Tasks.Task ExportUsers(ProgressForm progress) { + if (!progress.KeepGoing) return; //Step 1: export the CustomFields to FormCustom if applicable so that when doing individual items we can export their custom data too var ocf = ObjectHasCustomFieldDataToExport("User"); bool ShouldExportCustom = ocf != null; var DateCustomFields = await ExportCustomFieldSchema(ocf, "User", "User"); - + //Step 2: export the objects UserPickList pl = UserPickList.GetList(false); @@ -417,7 +409,7 @@ namespace AyaNova.PlugIn.V8 var hasWiki = WikiPage.HasWiki(c.ID); if (hasWiki) { - // await ExportAttachments(ObjectTID, progress); + // await ExportAttachments(ObjectTID, progress); d.wiki = GetWikiContent(ObjectTID); } @@ -481,6 +473,7 @@ namespace AyaNova.PlugIn.V8 #region clients private async System.Threading.Tasks.Task ExportClients(ProgressForm progress) { + if (!progress.KeepGoing) return; var ObjectTypeName = "Client"; //Step 1: export the CustomFields to FormCustom if applicable so that when doing individual items we can export their custom data too var ocf = ObjectHasCustomFieldDataToExport(ObjectTypeName); @@ -489,7 +482,7 @@ namespace AyaNova.PlugIn.V8 //Step 2: export the objects ClientPickList pl = ClientPickList.GetList(); - progress.Append("Exporting " + pl.Count.ToString() + ObjectTypeName +"s"); + progress.Append("Exporting " + pl.Count.ToString() + ObjectTypeName + "s"); foreach (ClientPickList.ClientPickListInfo i in pl) { @@ -502,14 +495,14 @@ namespace AyaNova.PlugIn.V8 dynamic d = new JObject(); d.name = c.Name; - progress.Op(ObjectTypeName +" "+ d.name); + progress.Op(ObjectTypeName + " " + d.name); d.active = c.Active; d.notes = c.Notes; Tagit(c.RegionID, tags); Tagit(c.DispatchZoneID, tags); Tagit(c.ClientGroupID, tags); SetTags(d, tags); - + var hasWiki = WikiPage.HasWiki(c.ID); if (hasWiki) { @@ -533,7 +526,7 @@ namespace AyaNova.PlugIn.V8 if (!string.IsNullOrEmpty(NonFileUrls)) { //need to repost the object with the notes modified - d = rMainObject.ObjectResponse["data"]; + d = rMainObject.ObjectResponse["data"]; d.notes = NonFileUrls + "\n-----------------\n" + d.notes; await util.PutAsync("Customer/" + RavenId.ToString(), d.ToString()); } @@ -549,6 +542,7 @@ namespace AyaNova.PlugIn.V8 #region locales private async System.Threading.Tasks.Task ExportLocales(ProgressForm progress) { + if (!progress.KeepGoing) return; progress.Append("Exporting customized Locales"); //checksum locales //if a recognized checksum then don't import because it means it wasn't modified from stock