stable

Clone or download

Read-only

Display the recently viewed item in the picker

Part of story #24971 [modal] search for artifacts How to test - Enable the feature flag : tuleap config-set feature_flag_history_and_search_in_modal 1 - Before opening, make sure the concerned artifact has the artifact link field enabled - Open the artifact modal - Click on the list picker => If the link type is: parent => The recently viewed item is not displayed other => The rencently viewed item is displayed - Use the autocomplete => if the link type is: parent => recently vieweed item is not displayed. other => recently viewed item is dispalyed with the matching artifact section Note: A cache system to avoid the useless multiple call of the GET `users/:id/history` will be implemented later Change-Id: I806b5c6eaef0b7a8e6541feafa4fa89e439c36fd

Modified Files

Name
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/Caller/UserIdentifierProxy.ts +29 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/ArtifactCrossReferenceProxy.ts +6 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/LinkableArtifactProxy.ts +11 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.test.ts +46 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.ts +17 −1 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/user-history/UserHistory.ts +45 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/ArtifactLinkSelectorAutoCompleter.test.ts +135 −62 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/ArtifactLinkSelectorAutoCompleter.ts +40 −37 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkField.test.ts +72 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkField.ts +48 −8 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkFieldController.test.ts +7 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkedArtifactTemplate.test.ts +6 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/NewLinkTemplate.test.ts +6 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/RecentlyViewedArtifactGroup.ts +16 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/TypeSelectorTemplate.test.ts +6 −1 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/UserIdentifier.ts +22 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/LinkableArtifact.ts +1 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/LinkedArtifact.ts +1 −1 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/RetrieveUserHistory.ts +28 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js +3 −4 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveMatchingArtifactStub.ts +5 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrievePossibleParentsStub.ts +2 −3 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveUserHistoryStub.ts +35 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/UserIdentifierStub.ts +29 −0 Go to diff View file