Hi.
We wrote a Report Plugin, which is working fine. However, we need to filter by the Account_id of the Tenant in which the report is being generated. I tried use reportResult.getAccount() in process method, but it returns null.
Is there any way to get this information?
Thanks!
Hi there,
I will have a look for you and come back. Thanks for the question!
ctaylor
December 5, 2022, 11:34am
3
Hello,
I have pushed a fix for this issue in Morpheus future versions 5.4.13 and 5.5.3.
Using the following logger in the process
method of the ReportProvider
:
log.info("reportResult:${reportResult} reportResult.getReportTitle():${reportResult.getReportTitle()} reportResult.getAccount():${reportResult.getAccount()}, reportResult.getAccount()?.id:${reportResult.getAccount()?.id}, reportResult.getAccount()?.name:${reportResult.getAccount()?.name} reportResult.getCreatedBy(): ${reportResult.getCreatedBy()}")
The output before the fix:
reportResult:com.morpheusdata.model.ReportResult@3f5aef1 reportResult.getReportTitle():Report Instance Status Dec 05, 2022 11:24:38 reportResult.getAccount():null, reportResult.getAccount()?.id:null, reportResult.getAccount()?.name:null reportResult.getCreatedBy(): null
In 5.4.13 and 5.5.3…
The output from the Master tenant:
reportResult:com.morpheusdata.model.ReportResult@29f17f0c reportResult.getReportTitle():Report Instance Status Dec 05, 2022 11:21:47 reportResult.getAccount():com.morpheusdata.model.Account@75efa894, reportResult.getAccount()?.id:1, reportResult.getAccount()?.name:bartaps reportResult.getCreatedBy(): com.morpheusdata.model.User@6ca82e5b
The output from a subtenant:
reportResult:com.morpheusdata.model.ReportResult@3dca0c5c reportResult.getReportTitle():Report Instance Status Dec 05, 2022 11:23:17 reportResult.getAccount():com.morpheusdata.model.Account@736a3e27, reportResult.getAccount()?.id:2, reportResult.getAccount()?.name:subtenant reportResult.getCreatedBy(): com.morpheusdata.model.User@e012baf
My apologies for the inconvenience.
Kind regards,
Chris
Hi Chris.
Thanks for the quick response!
Let’s wait for version 5.4.13/5.5.3.
Great job!