avniproject / JSSCP

0 stars 0 forks source link

[JSSCP Support] Debug and Fix rule failure e3ab6f53-5fae-43fd-be42-ae295eafaa61 #337

Closed nupoorkhandelwal closed 3 months ago

nupoorkhandelwal commented 5 months ago

Rule uuid

e3ab6f53-5fae-43fd-be42-ae295eafaa61

Context

As per stacktrace, this rule failure is due to offline report card - "No of children - gained grade"

Error message is

Cannot read property 'getObservationReadableValue' of undefined

Tasks

Gojo-Taqi commented 4 months ago

Fixed the following rules as well with uuids

Gojo-Taqi commented 4 months ago

The changes are done in jsscpuat_new.

Gojo-Taqi commented 4 months ago

The line of code fixed is this one below. if(!_.isNil(latestEncounter1) && !_.isNil(latestEncounter2)) It was not checking if the latestEncounters were defined or not.

The issue also occurred because of "ruleServiceLibraryInterfaceForSharingModules", which was later fixed by running the the script available on readme. https://avni.readme.io/docs/updating-rules-in-bulk