CSV Reporting Error if any date field has null values - OpenSearch Version 2.15 -

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch Version - 2.15
OpenSearch Dashboards Version - 2.15
Server OS - Ubuntu
Proxy - Nginx
Opensearch Dashboards accessing through - Chrome - Version 126.0.6478.127 (Official Build) (64-bit)

Describe the issue:
I have upgraded OpenSearch from version 2.2.1 to 2.15.0.
I had Report Definitions configured to generate CSV Reports of saved searches.
Few reports are not getting downloaded which has null/empty date fields.

Relevant Logs or Screenshots:
{“type”:“log”,“@timestamp”:“2024-07-18T13:22:56Z”,“tags”:[“error”,“plugins”,“reportsDashboards”],“pid”:26132,“message”:“Failed to generate report from reportDefinition id KGYQbYkB3XEOcKgCyok3 : TypeError: Cannot read property ‘length’ of null”}
{“type”:“log”,“@timestamp”:“2024-07-18T13:22:56Z”,“tags”:[“error”,“plugins”,“reportsDashboards”],“pid”:26132,“message":"TypeError: Cannot read property ‘length’ of null\n at getOpenSearchData (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/plugins/reportsDashboards/server/routes/utils/dataReportHelpers.ts:150:25)\n at convertOpenSearchDataToCsv (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/plugins/reportsDashboards/server/routes/utils/savedSearchReportHelper.ts:274:35)\n at generateReportData (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/plugins/reportsDashboards/server/routes/utils/savedSearchReportHelper.ts:170:10)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at createSavedSearchReport (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/plugins/reportsDashboards/server/routes/utils/savedSearchReportHelper.ts:45:16)\n at createReport (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/plugins/reportsDashboards/server/routes/lib/createReport.ts:74:28)\n at /home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/plugins/reportsDashboards/server/routes/report.ts:209:28\n at Router.handle (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/src/core/server/http/router/router.js:174:44)\n at handler (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/src/core/server/http/router/router.js:140:50)\n at exports.Manager.execute (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/toolkit.js:60:28)\n at Object.internals.handler (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/handler.js:46:20)\n at exports.execute (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/handler.js:31:20)\n at Request._lifecycle (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/request.js:371:32)\n at Request._execute (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/request.js:281:9)”}
{“type”:“error”,“@timestamp”:“2024-07-18T13:22:56Z”,“tags”:,“pid”:26132,“level”:“error”,“error”:{“message”:“Internal Server Error”,“name”:“Error”,“stack”:“Error: Internal Server Error\n at HapiResponseAdapter.toError (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/src/core/server/http/router/response_adapter.js:127:19)\n at HapiResponseAdapter.toHapiResponse (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/src/core/server/http/router/response_adapter.js:83:19)\n at HapiResponseAdapter.handle (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/src/core/server/http/router/response_adapter.js:79:17)\n at Router.handle (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/src/core/server/http/router/router.js:175:34)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at handler (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/src/core/server/http/router/router.js:140:50)\n at exports.Manager.execute (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/toolkit.js:60:28)\n at Object.internals.handler (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/handler.js:46:20)\n at exports.execute (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/handler.js:31:20)\n at Request._lifecycle (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/request.js:371:32)\n at Request._execute (/home/ubuntu/Opensearch/opensearch-dashboards-2.15.0/node_modules/@hapi/hapi/lib/request.js:281:9)”},“url”:“https://IP:5601/api/reporting/generateReport/KGYQbYkB3XEOcKgCyok3?timezone=Asia%2FCalcutta&dateFormat=MMM%20D%2C%20YYYY%20%40%20HH%3Amm%3Ass.SSS&csvSeparator=%2C&allowLeadingWildcards=true",“message”:"Internal Server Error”}

I tried the below solutions

  1. adding headless-chrome and additional dependencies
  2. reindex data
  3. tried generating reports by removing date field which has null/empty values - it is getting generated
    But date field which has few null/empty values are also required in the report.

Gone through dataReportHelpers.js but not sure where to make changes so that it accepts null values as well.

Any solutions to resolve this issue would be appreciated.
Awaiting response.

Regards
Asna Tazeen