diff --git a/server/AyaNova/biz/WidgetBiz.cs b/server/AyaNova/biz/WidgetBiz.cs index 0abeaaf2..1be8fa48 100644 --- a/server/AyaNova/biz/WidgetBiz.cs +++ b/server/AyaNova/biz/WidgetBiz.cs @@ -26,6 +26,7 @@ namespace AyaNova.Biz AddField("dollaramount", "WidgetDollarAmount", AyDataType.Decimal). AddField("active", "WidgetActive", AyDataType.Bool). AddField("startdate", "WidgetStartDate", AyDataType.Date). + AddField("count", "WidgetCount", AyDataType.Integer). AddField("enddate", "WidgetEndDate", AyDataType.Date); if (localizeToLocaleId != 0) diff --git a/server/AyaNova/resource/de.json b/server/AyaNova/resource/de.json index 44182932..f26168b1 100644 --- a/server/AyaNova/resource/de.json +++ b/server/AyaNova/resource/de.json @@ -1435,6 +1435,7 @@ "WidgetName":"Name", "WidgetSerial":"Seriennummer", "WidgetDollarAmount":"Betrag", + "WidgetCount":"Anzahl", "WidgetActive":"Aktiv", "WidgetRoles":"Rollen", "WidgetStartDate":"Startdatum", diff --git a/server/AyaNova/resource/en.json b/server/AyaNova/resource/en.json index 9db0f4ae..98bdbe92 100644 --- a/server/AyaNova/resource/en.json +++ b/server/AyaNova/resource/en.json @@ -1434,6 +1434,7 @@ "WidgetName":"Name", "WidgetSerial":"Serial #", "WidgetDollarAmount":"Price", + "WidgetCount":"Count", "WidgetActive":"Active", "WidgetRoles":"Roles", "WidgetStartDate":"Start", diff --git a/server/AyaNova/resource/es.json b/server/AyaNova/resource/es.json index 970a9f38..4d313213 100644 --- a/server/AyaNova/resource/es.json +++ b/server/AyaNova/resource/es.json @@ -1435,6 +1435,7 @@ "WidgetName":"Nombre", "WidgetSerial":"Número de serie", "WidgetDollarAmount":"Importe", + "WidgetCount":"Recuento", "WidgetActive":"Activa", "WidgetRoles":"Funciones", "WidgetStartDate":"Fecha de comienzo", diff --git a/server/AyaNova/resource/fr.json b/server/AyaNova/resource/fr.json index c77e9aff..86b44de6 100644 --- a/server/AyaNova/resource/fr.json +++ b/server/AyaNova/resource/fr.json @@ -1434,6 +1434,7 @@ "WidgetName":"Nom", "WidgetSerial":"Numéro de série", "WidgetDollarAmount":"Montant", + "WidgetCount":"Nombre", "WidgetActive":"Actif", "WidgetRoles":"Rôles", "WidgetStartDate":"Date de début", diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 6c88a41c..4fdb3905 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -22,7 +22,7 @@ namespace AyaNova.Util //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!! private const int DESIRED_SCHEMA_LEVEL = 9; - internal const long EXPECTED_COLUMN_COUNT = 106; + internal const long EXPECTED_COLUMN_COUNT = 107; internal const long EXPECTED_INDEX_COUNT = 24; //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!! diff --git a/test/raven-integration/DataFilter/DataFilterFilteringLists.cs b/test/raven-integration/DataFilter/DataFilterFilteringLists.cs index 96485893..397c9b63 100644 --- a/test/raven-integration/DataFilter/DataFilterFilteringLists.cs +++ b/test/raven-integration/DataFilter/DataFilterFilteringLists.cs @@ -117,7 +117,7 @@ namespace raven_integration Util.ValidateDataReturnResponseOk(a); ExcludedWidgetId = a.ObjectResponse["data"]["id"].Value(); - + //CREATE FILTER @@ -138,13 +138,11 @@ namespace raven_integration //inclusive test filter - HERE - - dynamic DataFilterActive = new JObject(); - DataFilterActive.fld = "active"; - DataFilterActive.op = OpEquality; - DataFilterActive.value = true; - dfilter.Add(DataFilterActive); + dynamic FilterItem = new JObject(); + FilterItem.fld = "count"; + FilterItem.op = OpEquality; + FilterItem.value = 555; + dfilter.Add(FilterItem); d.filter = dfilter.ToString();//it expects it to be a json string, not actual json @@ -158,35 +156,30 @@ namespace raven_integration Util.ValidateDataReturnResponseOk(a); Util.ValidateHTTPStatusCode(a, 200); - //assert contains at least two records - ((JArray)a.ObjectResponse["data"]).Count.Should().BeGreaterThan(1); + //assert contains at least this test record + ((JArray)a.ObjectResponse["data"]).Count.Should().BeGreaterThan(0); var v = ((JArray)a.ObjectResponse["data"]); List IDInResultList = new List(); - int nActiveMatches = 0; - int nInactiveMatches = 0; + int InclusiveMatchCount = 0; + int ExclusiveMatchCount = 0; foreach (JObject o in v) { - if (ActiveWidgetIdList.Contains(o["id"].Value())) - nActiveMatches++; - if (NotActiveWidgetIdList.Contains(o["id"].Value())) - nInactiveMatches++; + if (IncludedWidgetId == o["id"].Value()) + InclusiveMatchCount++; + if (ExcludedWidgetId == o["id"].Value())//whups + ExclusiveMatchCount++; } - nActiveMatches.Should().Be(ActiveWidgetIdList.Count); - nInactiveMatches.Should().Be(0); + InclusiveMatchCount.Should().BeGreaterOrEqualTo(1); + ExclusiveMatchCount.Should().Be(0); //DELETE WIDGETS - foreach (long l in ActiveWidgetIdList) - { - a = await Util.DeleteAsync("Widget/" + l.ToString(), await Util.GetTokenAsync("BizAdminFull")); - Util.ValidateHTTPStatusCode(a, 204); - } + a = await Util.DeleteAsync("Widget/" + IncludedWidgetId.ToString(), await Util.GetTokenAsync("BizAdminFull")); + Util.ValidateHTTPStatusCode(a, 204); + + a = await Util.DeleteAsync("Widget/" + ExcludedWidgetId.ToString(), await Util.GetTokenAsync("BizAdminFull")); + Util.ValidateHTTPStatusCode(a, 204); - foreach (long l in NotActiveWidgetIdList) - { - a = await Util.DeleteAsync("Widget/" + l.ToString(), await Util.GetTokenAsync("BizAdminFull")); - Util.ValidateHTTPStatusCode(a, 204); - } //DELETE DATAFILTER a = await Util.DeleteAsync("DataFilter/" + DataFilterId.ToString(), await Util.GetTokenAsync("BizAdminFull"));