stable

Clone or download

Read-only

refactor: RetrieveUsedFields takes tracker id into account

No functional change expected. CI should be happy. Notes: We need to retrieve fields from several different trackers for cross-tracker search with duck-typed fields. Previously, I would have added a method like `withSuccessiveFields()` in the stub, but it makes the tests dependent on the order of execution. Instead, we can change the stub so it behaves more realistically and returns the fields that have the correct tracker ID. Tests will now need to set up the fields with the right tracker IDs. As a bonus, we now only pass this interface once in DryRunDuckTypingFieldCollector. part of story #10710 search on fields with duck typing Change-Id: Ifccc5c1dc1f45af510041b5e898370d1f11c494e

Modified Files

Name
M plugins/kanban/tests/unit/KanbanActionsCheckerTest.php +99 −162 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +0 −1 Go to diff View file
M plugins/tracker/include/Tracker/Action/DryRunDuckTypingFieldCollector.php +3 −4 Go to diff View file
M plugins/tracker/tests/unit/Builders/ArtifactLinkFieldBuilder.php +13 −4 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerExternalFormElementBuilder.php +35 −11 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerFormElementFloatFieldBuilder.php +15 −5 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerFormElementIntFieldBuilder.php +12 −2 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerFormElementListFieldBuilder.php +24 −6 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerFormElementStringFieldBuilder.php +18 −8 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerFormElementTextFieldBuilder.php +14 −4 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ArtifactCreatorTest.php +8 −4 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/FieldsDataBuilderTest.php +19 −7 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/FieldsDataFromValuesByFieldBuilderTest.php +8 −3 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/PUTHandlerTest.php +6 −2 Go to diff View file
M plugins/tracker/tests/unit/Stub/RetrieveUsedFieldsStub.php +8 −5 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Action/DryRunDuckTypingFieldCollectorTest.php +300 −724 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Semantic/ArtifactCannotBeCreatedReasonsGetterTest.php +29 −13 Go to diff View file