stable

Clone or download

Read-only

feat: Handle semantic timeframe implied from another tracker in tracker duplication

part of: story #21362 Base artifact timeframe on a linked artifact Note: The timeframe semantic configuration is not kept when we duplicate a tracker from another project. * Let's say we duplicate the User stories tracker of project A to project B, which has a semantic timeframe inherited from project A Sprints tracker: --> Since we didn't duplicate project A Sprints tracker, we can't base the current semantic timeframe on it. In fact, we need to base this semantic on another tracker of the same project (B). Also, the import of the timeframe semantic has been extracted outside of the duplication of each tracker. We need all trackers to be created first to be able to duplicate this specific semantic, just like hierarchy and rules. In fact, the timeframe semantic for all trackers has to be duplicated in a second phase because of the possible inheritance of the semantic from one tracker to another. How to test Tracker duplication: - Create a Scrum project - Hack your DB to add in table `tracker_semantic_timeframe` the User Story tracker id [tracker_id] and your Sprints tracker id [implied_from_tracker_id] --> In your User Story tracker admin > Semantics > Timeframe you should see: "Timeframes will be based on Sprints linking artifacts of this tracker." 1. ...inside whole project duplication: - Create new project "from another project I'm admin of": choose the Scrum project you've just created. - Go to new project > tracker User Story > admin > Semantics > Timeframe --> you should see "Timeframes will be based on Sprints linking - The "See the Sprints tracker configuration" link should reference the Sprints tracker configuration of the Scrum project you've just created. 2. ...from same project - From your Scrum project tracker administration, --> create a new tracker "Tracker from another tracker", --> choose the current project as Project --> choose User Story tracker as Template - In your Scrum project > tracker User Story > admin > Semantics > Timeframe --> you should see "Timeframes will be based on Sprints linking --> The "See the Sprints tracker configuration" link should reference the Sprints tracker configuration of the current Scrum project. Change-Id: I0d71a243853ec686d1bb2925eb960aa89b554628

Modified Files

Name
M plugins/tracker/include/Tracker/Creation/TrackerCreator.php +36 −5 Go to diff View file
M plugins/tracker/include/Tracker/Semantic/Timeframe/SemanticTimeframeDuplicator.php +30 −7 Go to diff View file
M plugins/tracker/include/Tracker/Semantic/Tracker_SemanticFactory.class.php +0 −7 Go to diff View file
M plugins/tracker/include/Tracker/TrackerFactory.class.php +13 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Creation/TrackerCreatorTest.php +89 −11 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Semantic/Timeframe/SemanticTimeframeDuplicatorTest.php +165 −14 Go to diff View file
M plugins/tracker/tests/unit/Tracker/TrackerFactoryDuplicationTest.php +47 −4 Go to diff View file