stable

Clone or download

Read-only

feat: Check @project = 'self'

Part of story #39330 Choose on which tracker I perform my query Add an interface to ProjectDashboardDao which tries to retrieve the project id from the widget Then use it in validator to check if currrent XTS widget is in a project. If not so add an error to the error collector as @project = 'self' has no meaning outside a project. @project = 'aggregated' is marked as not supported yet The implied @project = 'self' when there is only @tracker condition will be managed from the @tracker point of view *Testing:* - In your project dashboard XTS widget, you can use @project = 'self' - In your personnal dashboard XTS widget, there is an error message shown Change-Id: I5733b6860a4cc30e898876147103b2d177988461

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportsResource.php +16 −3 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/CrossTrackerArtifactReportFactory.php +15 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/AllowedFrom.php +2 −0 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidFromCollectionBuilder.php +6 −5 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidFromCollectionParameters.php +1 −0 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidFromProjectCollectorParameters.php +1 −0 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidFromProjectCollectorVisitor.php +31 −5 Go to diff View file
M plugins/crosstracker/site-content/fr_FR/LC_MESSAGES/tuleap-crosstracker.po +11 −0 Go to diff View file
M plugins/crosstracker/site-content/pt_BR/LC_MESSAGES/tuleap-crosstracker.po +9 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/CrossTrackerFieldTestCase.php +24 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/ArtifactIdSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/ArtifactSelectTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/AssignedToSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/DateSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/DescriptionSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/LastUpdateBySelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/LastUpdateDateSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/NumericSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/PrettyTitleSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/ProjectNameSelectBuilderTest.php +1 −1 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/StaticListSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/StatusSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/SubmittedBySelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/SubmittedOnSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/TextSelectFromBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/TitleSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/TrackerNameSelectBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/UGroupListSelectFromBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Select/UserListSelectFromBuilderTest.php +1 −0 Go to diff View file
M plugins/crosstracker/tests/rest/CrossTracker/CrossTrackerTest.php +1 −1 Go to diff View file
M plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/InvalidFromCollectionBuilderTest.php +59 −29 Go to diff View file
A src/common/Dashboard/Project/IRetrieveProjectFromWidget.php +28 −0 Go to diff View file
M src/common/Dashboard/Project/ProjectDashboardDao.php +17 −2 Go to diff View file
M tests/integration/tests/Dashboard/Project/ProjectDashboardDaoTest.php +27 −2 Go to diff View file
A tests/lib/Stubs/Dashboard/Project/IRetrieveProjectFromWidgetStub.php +48 −0 Go to diff View file