cht-core: Issue with Report details label translation after dev-env-setup

Hello,
I recently completed the Dev setup from CHT Core dev environment setup – Community Health Toolkit
I am able to login to CHT, but when adding data using easy-mode.js from TDG (followed these steps)
The report detail page still shows missing translations (refer screenshot). Haven’t really made any changes or anything, everything is as the docs said.
Could someone help me out in getting this resolved? Or help me insert the data correctly if TDG data is outdated?
Thanks!

Adding to above. Since I was working on couple of cht-core Visual tests for Reports. When I run the tests, the report seems to be generated correctly by the report/pregnancy factories using generateReport. So, this issue occurs only when I run the application and use the “test-data-generator” data. Attaching screenshot of one of the similar views from the tests.

Thanks for raising this @Carbonautics, and welcome! The TLDR is that I think this is a minor “issue” with the data being generated from easy-mode.js. The visibility of fields on the Reports tab is controlled by the top-level hidden_fields property on the report document. Fields whose keys are included in hidden_fields are not rendered on the Reports tab.

When the CHT saves reports, it will automatically populate the hidden_fields based on the form configuration. But, TDG will just write whatever doc it is given and if the hidden_fields property is not specified, it will not be included (and then all the fields for the report will be shown).

Unless you are testing something specifically around the Reports tab, you can safely ignore this discrepancy. However, I have logged a TDG issue to update our sample scripts.

Additionally, I realized that our documentation for this hidden fields feature was incomplete. So I have opened a PR to add more details. :+1:

2 Likes

I did realize it was something related to hidden_fields but for a new contributor like me, we have no idea how the data is structured or how to create custom data. I actually tried all sample-scripts from TDG, all have the same issue. I was trying to work on updating the screenshots in the Reports Overview docs, but I think the visual tests will give me those for now….since I completed those today.

I also tried to host/build it locally and add data using cht-conf as per this: Getting Started Building a CHT App – Community Health Toolkit , but even this data/environment/app showed the same issue. I’m not sure if both these are from the same source or not. Might be worth a look here too.

1 Like