stable

Clone or download

Read-only

feat: Inherit expert query from project XTS widgets

part of request #40099 Cross-Tracker search finishing touches 16.1 How to test? - Set up a project T that will serve as base template. - Add a cross-tracker search widget, configure it in default mode and select a tracker from project T and a tracker from another project. - Add another cross-tracker search widget, leave it in expert mode. - Create a new project N, choose "From another project I am admin", choose project T. - In project N, the dashboard should be inherited, the two widgets should be there. The "default" widget uses the "mapped" tracker from project N and the other tracker. It also inherited the query. The "expert" widget inherited the query. Why? Previously (since story #10495), only the trackers were inherited. Now, the expert query and report mode (default or expert) are also inherited from Template projects. I made an exception and chose to use a mock instead of a Stub for SaveReportTrackers because the Stub would be reimplementing the mock library. We don't need to reuse this stub either (at least not yet, if the use-case arises, we can do something later). Change-Id: Ib273b92940de75b98eb76059e5e22f1942c719e9

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/CrossTrackerReportDao.php +25 −16 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/CloneReport.php +28 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/ReportInheritanceHandler.php +70 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/SaveReportTrackers.php +31 −0 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Widget/ProjectCrossTrackerSearch.php +7 −48 Go to diff View file
M plugins/crosstracker/include/crosstrackerPlugin.php +13 −1 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/CrossTrackerReportDaoTest.php +33 −20 Go to diff View file
M plugins/crosstracker/tests/rest/CrossTracker/CrossTrackerDataBuilder.php +7 −5 Go to diff View file
A plugins/crosstracker/tests/unit/CrossTracker/Report/ReportInheritanceHandlerTest.php +152 −0 Go to diff View file
A plugins/crosstracker/tests/unit/CrossTracker/Tests/Stub/Report/CloneReportStub.php +57 −0 Go to diff View file