Does anybody know a good way to get report requests for testing purposes into the reporting queue UI (openmrs/module/reporting/reports/manageReportQueue.htm)? Scheduling it does not do that, since they’re ran immediately when their scheduled time is reached and don’t show up in the queue for me.
I’m testing the deletion of a report request from the queue through clicking the delete icon, but for that I need a report there.
It’s really not a complicated change I need to check, but it’s bugging me and I don’t want to submit a pull request for something I haven’t seen work in the first place.
Things I’ve tried yet without success:
tried to get a report there by adding report requests in the UI
checked the DB for any flags I could possibly set to make reports show up in the queue
commented out the contents of purgeReportRequest() in hopes they might not be removed then
@darius It works, but when I add just that single line of code to the module, that I freshly pulled from upstream/master I get “Unable to locate named class org.openmrs.module.reporting.serializer.ReportingSerializer” when I press the cancel button on manageReportQueue.htm. With my own changes I even get a nullpointer exception, but that might be some other problem so I’d first need to get this error out of the way.
Oh, by the way, I don’t know if double-posting is discouraged here but I don’t think notifications would be sent out if I just edited my latest reply, so :/…
As an alternative to modifying and rebuilding the code, you should also just be able to set the global property “reporting.maxReportsToRun” to 0. This will result in all reports that you run to be queued, but never picked off of the queue to be executed.
Edit: nevermind my original post, I misunderstood that. Thanks for the tip.
But of course this does not fix the exception I get when cancelling a request from manageReportQueue.htm: “Unable to locate named class org.openmrs.module.reporting.serializer.ReportingSerializer” :/.
I did and I still get the error. I don’t know any specific details that might lead to this since I’m working with the SDK and without modifying anything but the global property mseaton mentioned.
Maybe I should mention the details of the report, although it probably won’t make a difference:
It’s an immediate request, with the report having no parameters, on all patients and having one SQL dataset definition where I query some table (doesn’t matter which) with SELECT * FROM table.
@dkayiwa I did that and it worked. Am I supposed to use this as a temporary solution, or was this just for testing purposes?
On a sidenote: Does this only have to do with the DWR Reporting Service or does it affect everything coming from manageReportQueue.htm? Because the DWR Reporting Service will be gone anyway once I submit my pull request.
That’s good, although that also means I will have to look elsewhere to find the reason for the nullpointer exception I get with my changes, hehe. But it’s good to know it’s not related to this problem. Thanks for the help.