avniproject / Goonj

0 stars 0 forks source link

(RFT) - Cannot read property 'findGroupedObservation' of undefined #100

Closed Gojo-Taqi closed 1 week ago

Gojo-Taqi commented 4 months ago

Link to the ticket - https://avni.freshdesk.com/a/tickets/4062

Gojo-Taqi commented 4 months ago

Notes Query to fetch the rule_failures

select * from rule_failure_telemetry rft 
where error_message = 'Cannot read property ''findGroupedObservation'' of undefined'
and is_closed is false;
-- 544 rows
Gojo-Taqi commented 4 months ago

Finding it difficult to reproduce the error. have asked them steps to reproduce the issue for now. Moving this card back to support ready.

BEULAHEVANJALIN commented 2 months ago
update rule_failure_telemetry
set is_closed        = true,
    closed_date_time = current_timestamp
where rule_uuid = 'd2a3d328-0775-4cdd-a0b1-f0f6c395341f'
  and is_closed is false
  and organisation_id = (select id from organisation where name = 'Goonj');

Closed 544 rfts. This is due to the missing null checks.

if (oldDistribution !== undefined) {
            let rpg = oldDistribution.findGroupedObservation('bafb80ac-6088-4649-8ed3-0501e1296c6e')[params.questionGroupIndex];
// ---
// ---