stable
Clone or download
Functional changes ================== Make sure that an artifact is referenced by (or is referencing) two or more git commits, in different repositories. On the cross reference field, the list of commits are grouped by sections with the title of the section being the path of the repository. Implementation details ====================== Previous implementation of cross references display in trackers was based on the legacy way that merely didn't change for a decade. Now that we want to display cross references in a structured manner, our objects naming must map for what they are used. So the proposal here is to have the following architecture: ``` +--------+ | Nature | |--------| | Label | | Icon | +--------+ | | | n +---------+ | Section | |---------| | Label | +---------+ | | | n +----------------+ | CrossReference | |----------------| | title | | url | | delete_url | +----------------+ ``` β¦knowing that we are starting from a flat array of cross references. So we need to ask to all "owners" to organize their own cross references into sections/nature. For now, only git plugin is involved, but in next commits tracker, pullrequest will join the party. In order to not be biaised by the existing goofy structure brought by CrossReferenceFactory (which are doing sql calls directly, and are providing unwanted semi-organized cross references collection), we are starting from the ground up. Therefore this reorganization produces a huge changeset. I tried to split the commit, but didn't find a way to produce something small AND understandable without losing my mind :/ For my defense, it should be noted that nearly two thirds of the added lines in this changeset are unit tests :) --- Part of story #17180 take into account gitlab commits Change-Id: Ibdab459f5a3ca5e8e22a427687ff2f2ad4c74d4b
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/git/include/Git/Reference/CrossReferenceGitOrganizer.php | +65 | β0 | Go to diff View file |
M | plugins/git/include/Git/ReferenceManager.class.php | +18 | β9 | Go to diff View file |
M | plugins/git/include/gitPlugin.php | +17 | β1 | Go to diff View file |
A | plugins/git/tests/unit/Git/Reference/CrossReferenceGitOrganizerTest.php | +170 | β0 | Go to diff View file |
M | plugins/git/tests/unit/Git/ReferenceManagerTest.php | +14 | β0 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Field/CrossReference/CrossReferenceFieldRenderer.php | +1 | β12 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_CrossReferences.php | +13 | β6 | Go to diff View file |
D | plugins/tracker/include/Tracker/FormElement/View/Reference/CrossReferenceByNaturePresenterBuilder.php | +0 | β63 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/View/Reference/CrossReferenceFieldPresenter.php | +10 | β29 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/View/Reference/CrossReferenceFieldPresenterBuilder.php | +11 | β30 | Go to diff View file |
D | plugins/tracker/include/Tracker/FormElement/View/Reference/CrossReferenceLinkPresenter.php | +0 | β90 | Go to diff View file |
D | plugins/tracker/include/Tracker/FormElement/View/Reference/CrossReferenceLinkPresenterCollectionBuilder.php | +0 | β60 | Go to diff View file |
M | plugins/tracker/templates/form-element/reference/cross_reference.mustache | +15 | β13 | Go to diff View file |
M | plugins/tracker/templates/form-element/reference/cross_reference_section.mustache | +24 | β22 | Go to diff View file |
D | plugins/tracker/tests/unit/Tracker/FormElement/View/Reference/CrossReferenceByNaturePresenterBuilderTest.php | +0 | β169 | Go to diff View file |
M | plugins/tracker/tests/unit/Tracker/FormElement/View/Reference/CrossReferenceFieldPresenterBuilderTest.php | +29 | β135 | Go to diff View file |
D | plugins/tracker/tests/unit/Tracker/FormElement/View/Reference/CrossReferenceLinkPresenterCollectionBuilderTest.php | +0 | β150 | Go to diff View file |
R | plugins/tracker/include/Tracker/FormElement/View/Reference/CrossReferenceByNaturePresenter.php | Go to diff View file | ||
A | src/common/Reference/CrossReferenceByDirectionPresenterBuilder.php | +82 | β0 | Go to diff View file |
A | src/common/Reference/CrossReferenceByNatureOrganizer.php | +157 | β0 | Go to diff View file |
A | src/common/Reference/CrossReferenceNaturePresenter.php | +80 | β0 | Go to diff View file |
A | src/common/Reference/CrossReferencePresenter.php | +76 | β0 | Go to diff View file |
A | src/common/Reference/CrossReferencePresenterFactory.php | +116 | β0 | Go to diff View file |
R | plugins/tracker/include/Tracker/FormElement/View/Reference/CrossReferenceLinkListPresenter.php | Go to diff View file | ||
A | src/common/Reference/CrossReferencesDao.php | +48 | β0 | Go to diff View file |
D | src/common/reference/CrossReferenceByDirectionCollection.php | +0 | β183 | Go to diff View file |
M | src/common/reference/CrossReferenceFactory.class.php | +0 | β9 | Go to diff View file |
M | src/themes/tlp/src/scss/components/_cards.scss | +4 | β0 | Go to diff View file |
A | tests/unit/common/Reference/CrossReferenceByDirectionPresenterBuilderTest.php | +104 | β0 | Go to diff View file |
A | tests/unit/common/Reference/CrossReferenceByNatureOrganizerTest.php | +219 | β0 | Go to diff View file |
A | tests/unit/common/Reference/CrossReferenceNaturePresenterTest.php | +47 | β0 | Go to diff View file |
A | tests/unit/common/Reference/CrossReferencePresenterFactoryTest.php | +152 | β0 | Go to diff View file |
A | tests/unit/common/Reference/CrossReferenceSectionPresenterTest.php | +46 | β0 | Go to diff View file |