diff --git a/server/DataList/DataListFetcher.cs b/server/DataList/DataListFetcher.cs index 5259bee..5affb9a 100644 --- a/server/DataList/DataListFetcher.cs +++ b/server/DataList/DataListFetcher.cs @@ -1,4 +1,4 @@ -#define AYSHOWQUERYINFO +//#define AYSHOWQUERYINFO using System.Collections.Generic; using System.Linq; diff --git a/server/DataList/GZCaseDataList.cs b/server/DataList/GZCaseDataList.cs index 2381c7c..d843a83 100644 --- a/server/DataList/GZCaseDataList.cs +++ b/server/DataList/GZCaseDataList.cs @@ -10,11 +10,11 @@ namespace Sockeye.DataList public GZCaseDataList(long translationId) { DefaultListAType = SockType.GZCase; - SQLFrom = @"FROM agzcase "; + SQLFrom = @"FROM agzcase LEFT JOIN acustomer ON (agzcase.customerid = acustomer.id)"; var RoleSet = BizRoles.GetRoleSet(DefaultListAType); AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; - DefaultColumns = new List() { "GZCaseId", "Tags", "GZCaseName", "GZCaseClosed" }; + DefaultColumns = new List() { "GZCaseId", "Tags", "GZCaseName", "GZCaseClosed", "Customer" }; DefaultSortBy = new Dictionary() { { "GZCaseId", "-" } }; FieldDefinitions = new List(); @@ -54,6 +54,17 @@ namespace Sockeye.DataList SqlValueColumnName = "agzcase.name" }); + + FieldDefinitions.Add(new DataListFieldDefinition + { + TKey = "Customer", + FieldKey = "Customer", + SockType = (int)SockType.Customer, + UiFieldDataType = (int)UiFieldDataType.Text, + SqlIdColumnName = "agzcase.customerid", + SqlValueColumnName = "acustomer.name" + }); + FieldDefinitions.Add(new DataListFieldDefinition { TKey = "Tags", diff --git a/server/util/AySchema.cs b/server/util/AySchema.cs index 25bc957..eb1f4d4 100644 --- a/server/util/AySchema.cs +++ b/server/util/AySchema.cs @@ -22,16 +22,16 @@ namespace Sockeye.Util //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! private const int DESIRED_SCHEMA_LEVEL = 17; - internal const long EXPECTED_COLUMN_COUNT = 505; + internal const long EXPECTED_COLUMN_COUNT = 506; internal const long EXPECTED_INDEX_COUNT = 74; internal const long EXPECTED_CHECK_CONSTRAINTS = 242; - internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 33; + internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 34; internal const long EXPECTED_VIEWS = 0; internal const long EXPECTED_ROUTINES = 2; //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! - ///////////////////////////////////////// (C505:I74:CC242:FC33:V0:R2) + ///////////////////////////////////////// (C506:I74:CC242:FC34:V0:R2) /* MAXIMUM POSTGRES OBJECT NAME LENGTH: 63 CHARACTERS