stable
Clone or download
/!\ I really hope I got this right, tough review /!\ The initial purpose of this commit was to add tests on the rendering of the PossibleParentSelector. While doing that, I had to investigate the various behavious, esp in the most legacy part of that: AgileDashboard. In `ArtifactParentsSelectorEventListener` the logic is thrown in two cases: 1. If there is a `child_milestone` parameter 2. If the param `func` is equals to `new-artifact-link` As far as I can tell, there is no longer any code that produce `child_milestone` parameter. From my various digging into the code, it seems to be a remaining part of the Planning v1 when stuff was created in Tracker and we had redirect between agiledashboard and tracker for creation. As now everything is handled by the Planning v2 or Taskboard app the related logic is no longer needed. For `new-artifact-link`, again AFAICT, it seems to only kick when someone is creating a new artifact from the Artifact view (aka lightwindow modal). More specifically, when one tries to create a new User Story from an Epic artifact, instead of having the parent selector, the interface displays "Will have $EPIC_TITLE as parent". However this behavior is already broken because, on master, $EPIC_TITLE doesnt magically end-up being the parent (probably due to the removal of the magic of Tracker hierarchy earlier this year). If you don't set the artifact link type at creation, the user story doesn't end up being a child. As the original use case no longer seems called and the only one that is not dead code no longer actually works, I decided to remove the entire code. PS: 👋 to you from the 🛡️ team who is gonna read this commit message after hours of painful debug and back & forth exchanges in the tracker for an obscure behaviour that caused a REGERESSION! I really meant what I wrote here, it really seems that this code no longer do anything useful. I appologize in advance. Part of story #22681 select a parent from Program for my features/enablers Change-Id: I3afd2312860ccd93f6762ac37fcae5a00c0bbe15
Modified Files
Name | ||||
---|---|---|---|---|
D | plugins/agiledashboard/include/Planning/ArtifactParentsSelector.class.php | +0 | −64 | Go to diff View file |
D | plugins/agiledashboard/include/Planning/ArtifactParentsSelector/Command.class.php | +0 | −65 | Go to diff View file |
D | plugins/agiledashboard/include/Planning/ArtifactParentsSelector/NearestMilestoneWithBacklogTrackerCommand.class.php | +0 | −63 | Go to diff View file |
D | plugins/agiledashboard/include/Planning/ArtifactParentsSelector/ParentInSameHierarchyCommand.class.php | +0 | −50 | Go to diff View file |
D | plugins/agiledashboard/include/Planning/ArtifactParentsSelector/SameTrackerCommand.class.php | +0 | −37 | Go to diff View file |
D | plugins/agiledashboard/include/Planning/ArtifactParentsSelector/SubChildrenBelongingToTrackerCommand.class.php | +0 | −88 | Go to diff View file |
D | plugins/agiledashboard/include/Planning/ArtifactParentsSelectorEventListener.class.php | +0 | −96 | Go to diff View file |
M | plugins/agiledashboard/include/agiledashboardPlugin.php | +0 | −14 | Go to diff View file |
M | plugins/agiledashboard/site-content/fr_FR/LC_MESSAGES/tuleap-agiledashboard.po | +0 | −4 | Go to diff View file |
D | plugins/agiledashboard/tests/unit/AgileDashboard/Planning/ArtifactParentsSelectorTest.php | +0 | −401 | Go to diff View file |
D | plugins/agiledashboard/tests/unit/Planning/Planning_ArtifactParentsSelectorEventListenerTest.php | +0 | −191 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Field/ArtifactLink/PossibleParentSelectorRenderer.php | +10 | −9 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.php | +2 | −2 | Go to diff View file |
M | plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po | +0 | −4 | Go to diff View file |
A | plugins/tracker/tests/unit/Tracker/FormElement/Field/ArtifactLink/PossibleParentSelectorRendererTest.php | +103 | −0 | Go to diff View file |
M | src/common/Config/ForgeConfig.php | +5 | −0 | Go to diff View file |