Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFT] rulesConfig is not defined #82

Open
Gojo-Taqi opened this issue May 8, 2024 · 2 comments
Open

[RFT] rulesConfig is not defined #82

Gojo-Taqi opened this issue May 8, 2024 · 2 comments
Assignees
Labels

Comments

@Gojo-Taqi
Copy link
Contributor

Gojo-Taqi commented May 8, 2024

Link to the report

Rule uuid - 'e93303fa-f465-4db7-a945-d4fd6295f2b9'

@Gojo-Taqi Gojo-Taqi self-assigned this May 8, 2024
@BEULAHEVANJALIN
Copy link

update rule_failure_log
set is_closed        = true,
    closed_date_time = current_timestamp
where uuid in (
               'dd0d39d8-9260-41fe-8778-7a39e4532948',
               '7d8d707a-20b7-4b45-900e-e6c12d66393f',
               '0c29f6aa-e85b-4671-b3b0-1ae82510d8ad',
               'af6d741c-0b8e-4e5e-8049-40e5356fc74f'
    )
  and is_closed is not true; -- 4

Closed 4 RFLs as they are old and use voided forms.

@BEULAHEVANJALIN
Copy link

BEULAHEVANJALIN commented Jul 11, 2024

select rfl.entity_id,
       rfl.entity_type,
       rfl.rule_type,
       f.name,
       rfl.uuid,
       rfl.error_message,
       rfl.created_date_time,
       p.name,
       p.enrolment_summary_rule,
       stacktrace
from rule_failure_log rfl
         left join form f on rfl.form_id = f.uuid
         join public.program_enrolment on program_enrolment.uuid = entity_id
         join program p on program_enrolment.program_id = p.id
where error_message like '%rulesConfig is not defined%'
  and is_closed is not true
order by rfl.created_date_time desc; -- 25 rows

There were 25 RFLs from sickle cell program summary. Seems the script is correct with all null checks added. We need to find out if there are any missings on the prod side. Also this summary rule uses findObservationInEntireEnrolment in a lot of places. We need to check if this method causing the issue.
The same with encounter as well.

Users are also syncing their apps regularly, seems that the sync is always complete.
So the only thing is to check the rules line by line by commenting and verifying them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants