-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activities. Resource id is missing in the old activities #9712
Comments
This is somewhat expected behaviour. If an item is deleted, the resourceID cannot be retrieved any more (because the item is gone). Hence this field is omitted in the activity. Note that the |
When a file is created, renamed and followed by moving it inside a folder then only the last activity (ie. moving the file inside a folder) will have a resource id and all other previous activities will have empty resource id. How about this behaviour? Is this behaviour expected or not? json response{
"value": [
{
"id": "d9c43535-14a2-40eb-a394-0911928a477c",
"template": {
"message": "{user} moved {resource} to {space}",
"variables": {
"resource": {
"id": "2b925c95-bc36-4843-8f97-239aa208632b$c04b4b5a-ca00-48e2-bfb0-f1990461cedb!74257106-28d8-4311-9397-05bed6590955",
"name": "error.txt"
},
"space": {
"id": "c04b4b5a-ca00-48e2-bfb0-f1990461cedb!c04b4b5a-ca00-48e2-bfb0-f1990461cedb",
"name": "Admin"
},
"user": {
"id": "c04b4b5a-ca00-48e2-bfb0-f1990461cedb",
"displayName": "admin"
}
}
},
"times": {
"recordedTime": "2024-08-06T10:10:08.04644023Z"
}
},
{
"id": "c1661be2-b847-4af4-8c81-125159491fec",
"template": {
"message": "{user} renamed {oldResource} to {resource}",
"variables": {
"oldResource": {
"id": "",
"name": "renamedFile.txt"
},
"resource": {
"id": "",
"name": "error.txt"
},
"user": {
"id": "c04b4b5a-ca00-48e2-bfb0-f1990461cedb",
"displayName": "admin"
}
}
},
"times": {
"recordedTime": "2024-08-06T10:05:49.625296602Z"
}
},
{
"id": "d83c1e03-e1f2-4d3f-bf58-b29dda0b79a2",
"template": {
"message": "{user} added {resource} to {space}",
"variables": {
"resource": {
"id": "",
"name": "renamedFile.txt"
},
"space": {
"id": "2b925c95-bc36-4843-8f97-239aa208632b$c04b4b5a-ca00-48e2-bfb0-f1990461cedb!c04b4b5a-ca00-48e2-bfb0-f1990461cedb",
"name": "Admin"
},
"user": {
"id": "c04b4b5a-ca00-48e2-bfb0-f1990461cedb",
"displayName": "admin"
}
}
},
"times": {
"recordedTime": "2024-08-06T10:05:08.139268732Z"
}
}
]
} |
No. The itemid doesn't change when a file is moved. This is a bug imo. |
only the latest action activity has the value in the resource id: "resource": {
"id": "{resource-id}" |
I double checked. This is because the events do not contain the itemid but only a reference (containing a path). The fix to this is rather expensive. There are two options: A) We pass the itemID through the opaque until the events middleware. This brings some challenges. See for example discussion on this PR: cs3org/reva#4767 B) We get rid of the events middleware and emit events at the place they are created in. This will bring code duplication (e.g. posixfs and decomposedfs both need to emit some events). Both options are rather costly. I wouldn't want to tackle it without a proper plan. Fix depends on priority. |
Describe the bug
For activities api: GET
/v1beta1/extensions/org.libregraph/activities
, resource id is missing for file creation event when activity is checked after deleting the file.Steps to reproduce
For the file upload event, we receive an empty string in the resource id that previously contained the id when checking activity after file deletion.
Expected behavior
There should be resource id.
Actual behavior
Resource id is missing.
The text was updated successfully, but these errors were encountered: