Open bkbeckman opened 7 years ago
Thanks for the feedback @bkbeckman - we would welcome a pull request implementing this change and allowing you to build your plugin with custom parameters. So hopefully you have a chance to create and submit this PR for our review? :+1:
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.