From 7782259944cb8c179886fd66280c3a230a4f79ff Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 7 May 2021 17:55:15 +0000 Subject: [PATCH] --- .vscode/launch.json | 2 +- server/AyaNova/biz/WorkOrderBiz.cs | 16 ++++++++++------ server/AyaNova/generator/CoreJobLicense.cs | 7 ++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 8fd97968..0e2049e9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -53,7 +53,7 @@ "AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles", "AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles", "AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles", - "AYANOVA_SERVER_TEST_MODE": "true", + "AYANOVA_SERVER_TEST_MODE": "false", "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small", "AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7", "AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\" diff --git a/server/AyaNova/biz/WorkOrderBiz.cs b/server/AyaNova/biz/WorkOrderBiz.cs index 471b85f9..684c0941 100644 --- a/server/AyaNova/biz/WorkOrderBiz.cs +++ b/server/AyaNova/biz/WorkOrderBiz.cs @@ -559,7 +559,7 @@ namespace AyaNova.Biz o.AlertViz = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => x.PopUpNotes).FirstOrDefaultAsync(); //project viz - if (o.ProjectId != null) + if (o.ProjectId != null) o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync(); } @@ -1144,15 +1144,19 @@ namespace AyaNova.Biz AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderId"); } -//summary is required now, this is a change from v7 -//I did this because it is required in terms of hiding on the form so it also -//is required to have a value. This is really because the form field customization I took away the hideable field -//maybe I should add that feature back? - if (proposedObj.WorkOrderId == 0) + //summary is required now, this is a change from v7 + //I did this because it is required in terms of hiding on the form so it also + //is required to have a value. This is really because the form field customization I took away the hideable field + //maybe I should add that feature back? + if (proposedObj.WorkOrderId == 0) AddError(ApiErrorCode.VALIDATION_REQUIRED, "WorkOrderId"); // // //TEST TEST TEST + if (string.IsNullOrWhiteSpace(proposedObj.Notes)) + { + AddError(ApiErrorCode.VALIDATION_REQUIRED, "Notes"); + } // if (proposedObj.Notes.Contains("blah")) // { // ; diff --git a/server/AyaNova/generator/CoreJobLicense.cs b/server/AyaNova/generator/CoreJobLicense.cs index b283a427..ce8fbbb5 100644 --- a/server/AyaNova/generator/CoreJobLicense.cs +++ b/server/AyaNova/generator/CoreJobLicense.cs @@ -70,9 +70,10 @@ namespace AyaNova.Biz var ServerState = (AyaNova.Api.ControllerHelpers.ApiServerState)ServiceProviderProvider.Provider.GetService(typeof(AyaNova.Api.ControllerHelpers.ApiServerState)); var ret = await AyaNova.Core.License.FetchKeyAsync(ServerState, ct, log, true); - #if (DEBUG) - log.LogInformation("TEST FETCH OK"); - #endif + //When this was enabled never saw a failed fetch, trying again without it + // #if (DEBUG) + // log.LogInformation("TEST FETCH OK"); + // #endif //most often the result will be "notfound" but in future might be other results if (ret == "ok") {