This commit is contained in:
2021-09-01 18:41:44 +00:00
parent 1ae59ffdf9
commit fe44061e63

View File

@@ -522,6 +522,7 @@ namespace AyaNova.PlugIn.V8
await ExportClientServiceRequests(progress);
await SynchronizeInventory(progress);
await ExportGlobalSettings(progress);
await ExportGlobalRegionalWiki(progress);
if (progress.KeepGoing)
{
@@ -4848,6 +4849,50 @@ namespace AyaNova.PlugIn.V8
#region Global / Regional WIKIPAGES
private async System.Threading.Tasks.Task ExportGlobalRegionalWiki(ProgressForm progress)
{
ResetUniqueNames();
if (!progress.KeepGoing) return;
progress.Op("Start Global / Regional WIKI page export");
progress.SubOp("Global WIKI check");
if (WikiPage.HasWiki(Address.GlobalAddressID))
{
progress.SubOp("Global WIKI exists, migrating to special User account");
dynamic d = new JObject();
d.name = "zV8Migrate GLOBAL_WIKI_REPOSITORY";
d.wiki = await GetWikiContent(new TypeAndID(RootObjectTypes.Global,Address.GlobalAddressID));
d.active = false;
d.userType = 2;
d.roles = 0;
d.login = util.RandomString();
d.password = util.RandomString();
d.notes = "This record created by V8Migrate utility to contain the AyaNova 7 Global WIKI which has no corresponding place in v8";
await util.PostAsync("user", d);
}
RegionList l = RegionList.GetList(string.Empty);
progress.SubOp("Regional WIKI checks");
foreach (RegionList.RegionListInfo i in l)
{
if (WikiPage.HasWiki(i.LT_Region_Label_Name.Value))
{
progress.SubOp("Region "+i.LT_Region_Label_Name.Display+" WIKI exists, migrating to special User account");
dynamic d = new JObject();
d.name = "zV8Migrate REGION_WIKI_REPOSITORY_"+i.LT_Region_Label_Name.Display;
d.wiki = await GetWikiContent(new TypeAndID(RootObjectTypes.Region, i.LT_Region_Label_Name.Value));
d.active = false;
d.userType = 2;
d.roles = 0;
d.login = util.RandomString();
d.password = util.RandomString();
d.notes = "This record created by V8Migrate utility to contain the AyaNova 7 Regional WIKI which has no corresponding place in v8";
await util.PostAsync("user", d);
}
}
}
#endregion global regional wiki pages
@@ -5859,7 +5904,7 @@ namespace AyaNova.PlugIn.V8
{
//this is image links to file attachments
//if there is no match then chuck it, it's not critically important and already was missing in v7 anyway
var RavenId = await Getv7v8IdMapNullOk(new Guid(m.Groups["guid"].Value), tid.RootObjectType, false);//Map[new Guid(m.Groups["guid"].Value)];
var RavenId = await Getv7v8IdMapNullOk(new Guid(m.Groups["guid"].Value), tid.RootObjectType, false,true);//Map[new Guid(m.Groups["guid"].Value)];
if (RavenId != null)
content = content.Replace(m.Value, "<img src=\"" + "[ATTACH:" + RavenId.ToString() + "]" + "\">");
else