Issue
Covid-19 Global Health Data Set is populating only Countries data.Once you activated Covid-19 Global Health Data Set Data in your instance then Scheduled job "COVID-19 Data feed - sync central instance" runs Every 6 hours and it will populate countries,States & locations data. Some times after loading Countries data Scheduled job finished without loading remaining data.In the logs we can see below Error
JavaScript evaluation error on:
gs.info("Sync covid19 data from data instance. Start");
var covidDataSynch = new Covid19DataSynch();
covidDataSynch.importCountries();
covidDataSynch.importStates();
covidDataSynch.importLocation();
covidDataSynch.importCurrent();
covidDataSynch.importDay();
gs.info("Sync covid19 data from data instance. End");
Root cause of JavaScriptException: java.lang.NullPointerException
: java.lang.NullPointerException:
Release
- Paris
- Orlando
- New York
- Madrid
Cause
Covid 19 data feed job fails to sync when the system date's format is not default .
Resolution
1. Clear all the records on the country table
Script to delete the entries in country table:
var gr = new GlideRecord('sn_imt_c19datafeed_country');
gr.query();
gr.deleteMultiple();
you need to run it in scope 'sn_imt_c19datafeed'
2. There is "Covid19DataSynch" script include in sys_script_include table , in this script
search for 'getDisplayValue('sys_updated_on') and replace it with the function getValue instead of display value
Line 41 should look like this:
if (self._isAfter(gr.getValue('sys_updated_on'),el.sys_updated_on)){
Line 82
if (self._isAfter(gr.getValue('sys_updated_on'),el.sys_updated_on)){
Line 117
if (self._isAfter(gr.getValue('sys_updated_on'),el.sys_updated_on)){
Line 151
if (self._isAfter(gr.getValue('sys_updated_on'),el.sys_updated_on)){
Line 364
oldestUpdatedDate = gr.getValue('sys_updated_on');
3. Run "COVID-19 Data Feed - sync central instance" schedule job ( it is in sysauto_script table ) manually onetime , after that every 6 hours this job automatically runs & populate data.