Fix code to speed up query for workplan by test report.
Merge pull request #366 from jfurlong/oe4.1.1

Fix code to speed up query for workplan by test report.