Error with GetDate Expression in HTML5 filter view
search cancel

Error with GetDate Expression in HTML5 filter view

book

Article ID: 234031

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

You created a filter as:

You navigated to Manage > Computers Left side view filters and selected the filter created. You created a filter with the Query Builder and used it as the Filter Expression field and the Expression "GetDate".

When you try to open the filter in the HTML5 view it shows the following error message:

"An error has occurred while loading the filter. Check server logs for details"


In the server logs, I found the following:

"Failed to resolve resource query from the xml configuration.
Invalid number (1) of operands for filter expression with operator '>'. "

 

"MainController failure.

Column '[].[]' is not found
   [System.ApplicationException @ Symantec.ActivityCenter.Api]
   at Symantec.ActivityCenter.Api.Models.Filter.SavedSearchToFilter.FindColumn(String dataTableName, String columnName, SavedSearch savedSearch)
   at Symantec.ActivityCenter.Api.Models.Filter.SavedSearchToFilter.GetFilterCriteria()
   at Symantec.ActivityCenter.Api.Models.Filter.SavedSearchToFilter.Convert()
   at Symantec.ActivityCenter.Api.Models.Filter.FilterProvider.GetFilter(Guid id)
   at Symantec.ActivityCenter.Api.Controllers.MainController.GetFilter(Guid id)
   at lambda_method(Closure , Object , Object[] )"

 

Steps to reproduce.

  1. Manage - Filters - Create a new Filter
  2. Use Query builder mode - Filter expression tab - Switch to advanced mode
  3. Create a filter  

  4. Go to Manage - Computers - Filters
  5. Click on the created filter and see logs for more details

Environment

ITMS 8.6 RU1

Cause

Known issue.

The issue is related to the structure of the item xml, which is created if we build a filter using the legacy UI. By ECV design, the dataField node is expected under the expression node (see for more details  SavedSearchFilter class and SavedSearchFilterExpression class)

Example:

 

When we build a filter using the legacy UI, the dataField node can be under the filter node. This case is not supported by the ECV.

Example:

ECV (Enhanced Console Views) UI capabilities are very limited to be able to display all the possible variety of filter expressions that may be edited in the SMP Core UI.

Resolution

This issue has been fixed under ITMS 8.6 RU3 release. With ITMS 8.6 RU3, we throw "IncompatibleFilterException" in the ECV codebase whenever the backend code is unable to parse adequately the filter XML.  In that case, ECV filter UI looks like this:

The "incompatible filter" link points to the SMP Core UI where the filter can be properly edited.

 

Workaround:
As a workaround, you can convert the filter to a "raw sql" filter.