ScheduledReports plugin does not support adding report parameters #11330
Labels
c: Platform
For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
Milestone
I'm building a plugin that integrates with ScheduledReports and I need the ability to pass in parameters.
I noticed there are callbacks for 'ScheduledReports.getReportParameters' and 'ScheduledReports.validateReportParameters'. However, it looks like the front-end does not take the results of a 'ScheduledReports.getReportParameters' into consideration when submitting the form field. Thus, the field is never populated when the user submits the form.
I added a handler with debug statements to each of these events and here are some results:
And form submission data from Chrome:
idReport:0
description:description
idSegment:
reportType:email
reportFormat:html
reports[]:MyCustomReport1
reports[]:MyCustomReport2
parameters[displayFormat]:1
parameters[emailMe]:true
parameters[evolutionGraph]:false
token_auth:
I believe the problem can be traced to the reportParametersScheduledReports.twig
file. As you can see, the parameters to submit are hard-coded in the javascript instead of being pulled dynamically from the $availableParameters variable.
The text was updated successfully, but these errors were encountered: