This commit is contained in:
@@ -25,11 +25,14 @@ Filters are saved to the database:
|
||||
- Could be compound for joins like "table.name" (no a prepends the table name)
|
||||
- Special indirect values such as "[TAGS]" which means cross filter with tags
|
||||
- op=one of the values specified in the FilterComparisonOperator class in Biz namespace
|
||||
- value= straight up direct comparison value
|
||||
- value = string version of direct comparison value or could be a special token meaning more
|
||||
- Never an empty string, empty string is invalid value
|
||||
- All Tokens are a value surrounded by this fragment: "{[XXX]}" where XXX is the token
|
||||
- if empty or null then will be a token "{[null]}"
|
||||
- If string then a string fragment, case is sensitive
|
||||
- If date then iso style date //RAVEN NOTE: it is my intention that dates come in iso8601 UTC format from the client
|
||||
- could be whole number or decimal number
|
||||
- Could be a special "macro" filter value like "[THIS_MONTH]" (always surrounded by square brackets, no need to disambiguate with a string because only applies to non string values)
|
||||
- Could be a special "macro" filter value like "{[THIS_MONTH]}"
|
||||
- Could be a series of id values like this "[23,45,56,123]" as in tag id's or something related to that case.
|
||||
|
||||
Upon user selecting a filter to use the list query string has the regular paging info but also the filter id as a query parameter
|
||||
|
||||
@@ -292,8 +292,8 @@ namespace AyaNova.Biz
|
||||
if (!FilterComparisonOperator.Operators.Contains(opType))
|
||||
AddError(ValidationErrorType.InvalidValue, "Filter", $"Filter array item {i}, \"op\" property value of \"{opType}\" is not a valid FilterComparisonOperator type");
|
||||
}
|
||||
if (filterItem["value"] == null)
|
||||
AddError(ValidationErrorType.RequiredPropertyEmpty, "Filter", $"Filter array item {i}, object is missing required \"value\" property ");
|
||||
if (filterItem["value"] == null || string.IsNullOrWhiteSpace(filterItem["value"].Value<string>()))
|
||||
AddError(ValidationErrorType.RequiredPropertyEmpty, "Filter", $"Filter array item {i}, object is missing or is empty the required \"value\" property ");
|
||||
//NOTE: value of nothing, null or empty is a valid value so no checking for it here
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,16 +51,7 @@ namespace AyaNova.Biz
|
||||
sb.Append(sColumn);
|
||||
sb.Append(" ");
|
||||
|
||||
//Added: 13-July-2006 prior fix on the 6th either broke due to other changes or
|
||||
//was not enough in the first place, oddly it was working then, but this is also needed
|
||||
//now to make it work:
|
||||
|
||||
//Handle bools with null values
|
||||
//this comes about from a user selecting blanks or nonblanks to filter a bool column
|
||||
if (sValue == "" && sDataType == "System.Boolean")
|
||||
{
|
||||
sValue = "False";
|
||||
}
|
||||
|
||||
|
||||
//handle null values separately
|
||||
if (sValue == "")
|
||||
|
||||
Reference in New Issue
Block a user