Hi Isomorphic,
We have the following JSON formatted AdvancedCriteria.
On the client, the relative date criteria is converted to the following.
On the server, the JSON formatted AdvancedCriteria is converted to an AdvancedCriteria object using AdvancedCriteria.decodeClientCriteria(String).
However, when the relative date criteria is then converted using AdvancedCriteria.convertRelativeDates(), it is not performing a conversion consistent with the client above, resulting in inconsistent server-side report data.
The same applies for $yesterday, etc.
Thanks
SmartClient Version: v10.1p_2016-06-09/Pro Deployment (built 2016-06-09)
We have the following JSON formatted AdvancedCriteria.
Code:
{ "_constructor":"AdvancedCriteria", "operator":"and", "criteria":[ { "fieldName":"launchTime", "operator":"notEqual", "value":{ "_constructor":"RelativeDate", "value":"$today" } } ] }
On the client, the relative date criteria is converted to the following.
Code:
data:{ operator:"and", criteria:[ { operator:"not", criteria:[ { operator:"betweenInclusive", fieldName:"launchTime", start:"2016-07-19T04:00:00.000", end:"2016-07-20T03:59:59.999" } ] } ] }
On the server, the JSON formatted AdvancedCriteria is converted to an AdvancedCriteria object using AdvancedCriteria.decodeClientCriteria(String).
Code:
AdvancedCriteria:[and:[{launchTime notEqual {_constructor=RelativeDate, value=$today}}]]
Code:
AdvancedCriteria:[and:[{launchTime notEqual java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/New_York",offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/New_York,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2016,MONTH=6,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=19,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]}]]
Thanks
SmartClient Version: v10.1p_2016-06-09/Pro Deployment (built 2016-06-09)
Comment