ocis
ocis copied to clipboard
[ocis] Show Activities (text only)
unblocks https://github.com/owncloud/web/issues/10800
Description
User Stories
-
As a user I want to see who made which changes to files, so that I can track modifications.
-
As a user I want to see who accessed files, so that I can track access.
Value
- improve collaboration
- provide transparency
Acceptance Criteria
- provide a KQL search endpoint for activity events
- filter criteria
- file-id, representing the search root location, optional (means: if empty, the search includes all spaces i have access to and the permission)
- limit: max. item count
- filter criteria
- search is recursive (includes all subfolders with depth = ∞; but we want to make this configurable in the future)
- share receiver can not see any activities, similar to versions.
- search response returns activity events containing the following informations:
- eventtime
- event type
- initiator (eg. the user id)
- and event type specific information
- added: file-id, parent file-id
- deleted: file-id, parent file-id
- unauthenticated download: file-id, Link name
- edited: file-id, parent file-id
- moved: file-id, target file-id
- renamed: old filename, new filename
- shared:
- share added: file-id, share receivers
- share removed: file-id, removed sharees
- member added: file-id, member receivers
- member removed: file-id, removed member
- link added: file-id
- link removed: file-id
Eventtypes:
- Name of the person who caused the event
- Event types (applicable to files, folders or spaces). text only representation for the first iteration.
- Added --> "24.12.2024 21:39 Albert Einstein added
new file.txt
toIdeas
" - Deleted --> "24.12.2024 21:39 Albert Einstein deleted
new file.txt
fromIdeas
" - Unauthenticated download --> "24.12.2024 21:39
new file.txt
was downloaded via Link-for-Albert" - Edited --> "24.12.2024 21:39 Albert Einstein edited
new file.txt
inIdeas
" - Moved --> "24.12.2024 21:39 Albert Einstein moved
new file.txt
toIdeas
" - Renamed --> "24.12.2024 21:39 Albert Einstein renamed
new file.txt
toIdea.txt
" - Shared
-
--> "24.12.2024 21:39 Albert Einstein shared
new file.txt
withMarie Curie, Maurice Moss, Class 7a
" -
--> "24.12.2024 21:39 Albert Einstein removed
Marie Curie, Maurice Moss, Class 7a
fromnew file.txt
" -
--> "24.12.2024 21:39 Albert Einstein added
Marie Curie, Maurice Moss, Class 7a
as member ofMarketing
" -
--> "24.12.2024 21:39 Albert Einstein removed
Marie Curie, Maurice Moss, Class 7a
fromMarketing
" -
--> "24.12.2024 21:39 Albert Einstein shared
new file.txt
via link -
--> "24.12.2024 21:39 Albert Einstein removed link from
new file.txt
-
- Added --> "24.12.2024 21:39 Albert Einstein added
Definition of ready
- [ ] Everybody needs to understand the value written in the user story
- [ ] Acceptance criteria have to be defined
- [ ] All dependencies of the user story need to be identified
- [ ] Feature should be seen from an end user perspective
- [ ] Story has to be estimated
- [ ] Story points need to be less than 20
Definition of done
- Functional requirements
- [ ] Functionality described in the user story works
- [ ] Acceptance criteria are fulfilled
- Quality
- [ ] Code review happened
- [ ] CI is green (that includes new and existing automated tests)
- [ ] Critical code received unit tests by the developer
- Non-functional requirements
- [ ] No sonar cloud issues
Visuals
@tbsbdr note that if we want to provide only text messages, and you want to show 'em styled (e.G bold font) text in the clients. It would be useful to bring markdown into the game.
Bring it in
The MS Graph API covers this as "Insights": https://learn.microsoft.com/en-us/graph/api/resources/officegraphinsights?view=graph-rest-1.0
Insights are relationships calculated using advanced analytics and machine learning techniques. You can, for example, identify OneDrive for Business documents trending around users.
Insights are returned by the following APIs:
- Trending - returns documents from OneDrive for Business and from SharePoint sites trending around a user.
- Used - returns documents viewed or modified by a user. Includes documents the user used in OneDrive for Business, and SharePoint.
- Shared - returns documents shared with or by the user. Documents can be shared as URLs, file attachments, reference attachments to OneDrive for Business and SharePoint files found in Outlook messages and meetings.
Each insight is returned with a resourceVisualization and resourceReference complex value type (CVT). The resourceVisualization CVT contains properties such as title and previewImageUrl. Microsoft uses the visualization properties to render the files in experiences like Office Delve.
Fer the beta version they updated it a little as "Item Insights": https://learn.microsoft.com/en-us/graph/api/resources/iteminsights?view=graph-rest-beta Trending AFAICT is still the same v1.0 vs beta
Another approach that aligns better with the proposed KQL solution and that clients could use to speed up synchronization (at some point in the future) is adding delta support: https://learn.microsoft.com/en-us/graph/delta-query-overview
It allows filtering, ordering and pagination.