stable

Clone or download

Read-only

feat: Add type and per_type_id properties to History entries

- call GET /users/:id/history - Entries have two more properties: type which represents the type of item ("kanban" | "artifact") and per_type_id which holds the ID of the history entry respective to its type: for "kanban", it is the kanban ID, for "artifact" it is the artifact ID. Notes: - Restler uses @type to understand the type of items held in arrays. It makes no difference in the API explorer to remove it. - It is fine to specify the runtime type of properties (not just docblocks) - Since we use a private static "factory" method, the constructor just assigns its parameters to properties. We can do the same in the method and it's just shorter. part of story #24971 [modal] search for artifacts Change-Id: I5e3a24a092565313d670a8857046bdc4e28dbea0

Modified Files

Name
M plugins/agiledashboard/include/AgileDashboard/Kanban.class.php +3 −3 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Kanban/KanbanXMLExporter.php +3 −3 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Kanban/RecentlyVisited/VisitRetriever.php +4 −0 Go to diff View file
M plugins/agiledashboard/tests/unit/AgileDashboard/Kanban/RecentlyVisited/VisitRetrieverTest.php +57 −12 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/RecentlyVisited/VisitRetriever.php +4 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/RecentlyVisited/VisitRetrieverTest.php +53 −17 Go to diff View file
M src/common/User/History/HistoryEntry.php +12 −0 Go to diff View file
M src/common/User/REST/v1/UserHistoryEntryRepresentation.php +51 −74 Go to diff View file
M src/common/User/REST/v1/UserHistoryRepresentation.php +6 −16 Go to diff View file
M src/common/User/REST/v1/UserResource.php +3 −4 Go to diff View file
A tests/lib/Builders/HistoryEntryBuilder.php +158 −0 Go to diff View file
M tests/unit/common/User/History/HistoryRetrieverTest.php +5 −23 Go to diff View file
A tests/unit/common/User/REST/v1/UserHistoryEntryRepresentationTest.php +147 −0 Go to diff View file
A tests/unit/common/User/REST/v1/UserHistoryRepresentationTest.php +37 −0 Go to diff View file