diff --git a/devdocs/specs/core-list-graph-datatable-filtering-paging.txt b/devdocs/specs/core-list-graph-datatable-filtering-paging.txt index 6d308090..d3870c81 100644 --- a/devdocs/specs/core-list-graph-datatable-filtering-paging.txt +++ b/devdocs/specs/core-list-graph-datatable-filtering-paging.txt @@ -39,8 +39,7 @@ NOTE: determined it would be too much trouble for too little gain to validate th LIST FILTERING TODO - DONE test for fetching widget filter options (localized, so have two users test each for expected response) - -Add test for excercising all of DataFilterController route including rights to non personal alternative owner etc + - Add test for excercising all of DataFilterController route including rights to non personal alternative owner etc Add test for correctly validated Widget datafilter when saved or updated via datafiltercontroller (sanity check of the filter settings and options IFilterableObject implemented) Add test for providing saved filter id to widgetlist and recieving correct filtered / paged / sorted results (test all those) diff --git a/server/AyaNova/biz/DataFilterBiz.cs b/server/AyaNova/biz/DataFilterBiz.cs index 84a8579d..7b4d86ab 100644 --- a/server/AyaNova/biz/DataFilterBiz.cs +++ b/server/AyaNova/biz/DataFilterBiz.cs @@ -270,6 +270,10 @@ namespace AyaNova.Biz var fld = filterItem["fld"].Value(); if (string.IsNullOrWhiteSpace(fld)) AddError(ValidationErrorType.RequiredPropertyEmpty, "Filter", $"Filter array item {i}, \"fld\" property is empty and required"); + //NOTE: have decided not to validate the field names are actually valid as that would involve a lot of fuckery that would probably be unproductive at this point + //as this datafilter normally would come straight from our client software that recieves its' list of fields directly from the object anyway + //maybe in future it will be more of an issue when it comes to modifications to objects or fields dropped but those errors should be caught by integration tests anyway + //and the rest are just outside users } if (filterItem["op"] == null)