Fixed an index error with the enterprise domains report #35799
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Product Description
Technical Summary
This is a fix in response to https://dimagi.atlassian.net/browse/SAAS-16537.
Recently, the domains report was updated to include some data that was previously available in the OData Feeds report, which shifted the domain field down several fields. Unfortunately, I did not update the API to reference that new index, and the old index contained an integer, rather than a string, which led to a mismatch due to the expected schema.
Safety Assurance
Safety story
Verified locally that I could import the domains report into PowerBI successfully.
Automated test coverage
This should have a test covering it, but I think the effort to create a framework to test reports is probably outside the scope of this ticket when a client is currently blocked by this. The API pulls from the domains enterprise report, so the straight-forward way to test this would be to construct a full enterprise report. Unfortunately, that requires creating a billing account, domain + subscription, web users, and setting up the elasticsearch indexes just to get a report that returns data for an empty domain. If we wanted to look at a realistic domains report, we'd also need to create exports etc. Long-term, I think we could create fake generators for all this data, but right now I don't think should attempt that.
QA Plan
No QA
Rollback instructions
Labels & Review