I’d like to have a conditional card that shows a calculation based on submitted reports. Using the following hierarchy sample, I want to have a conditional card at H calculated using A & B’s reports.
H
/ \
A B
Reports submitted against A & B are associated to the areas using place_id
on the report.
When calculating the conditional card for H, the reports
object injected doesn’t have the reports submitted for A & B. I’m guessing this is by design but I wanted to check of anyone knows of how to make A & B’s reports show up in the context of H as well.
Note that replication depth is not configured and the logged in user can view the reports under A & B.
So, the contact-summary docs note that:
An array of reports for the contact or for any of the contact’s person
children. Note that if the contact has more than 500 reports, only the 500 with the latest reported_date
values will be provided.
So, if A
and B
are persons, then things should just work and you should have access to their reports. However, since you are using place_id
in the reports, I expect that A
and B
are places not persons. Unfortunately, if they are places, then there is no way currently (that I know of) to load the reports of child places when calculating a contact summary…
1 Like
Just to add a bit more context to this issue, one issue we have discussed in the past is being able to actually access the child contacts when calculating the contact summary. It was noted on that issue that a more flexible/sustainable approach would be to give general support for making async calls when calculating the contact summary. This would unlock using the cht-datasource apis to do all kinds of things.
In the same vein, I think the ultimate solution to being able to see reports for child places would be to address #9623
and then you could load reports as necessary.
Thanks @jkuester.
I think the answer to my question is captured in your responses, the docs and the issues you linked; that, only contact (in view) reports and their direct person reports are available. That is, the reports are scoped to one level.
I had assumed that higher hierarchy levels get aggregate reports for the entire hierarchy such that all of A or B’s children reports would be available at H.
1 Like