Skip to content

Activities. Resource id is missing in the old activities #9712

@Salipa-Gurung

Description

@Salipa-Gurung

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

  1. Upload a file and check activity
{
    "value": [
        {
            "id": "28a2a0e4-d17d-437b-933f-51046f273a84",
            "template": {
                "message": "{user} added {resource} to {space}",
                "variables": {
                    "resource": {
                        "id": "27f71740-c352-4a78-aac2-abe581a673a7$3793776a-a355-45c1-9b29-a1d2fc722ca4!160ae583-9e97-4b39-8158-e5df30325af1",
                        "name": "testavatar.png"
                    },
                    "space": {
                        "id": "3793776a-a355-45c1-9b29-a1d2fc722ca4!3793776a-a355-45c1-9b29-a1d2fc722ca4",
                        "name": "Admin"
                    },
                    "user": {
                        "id": "3793776a-a355-45c1-9b29-a1d2fc722ca4",
                        "displayName": "admin"
                    }
                }
            },
            "times": {
                "recordedTime": "2024-07-30T10:30:56.310361965Z"
            }
        }
    ]
}
  1. Delete the file and check the activity
{
    "value": [
        {
            "id": "1307c6db-9243-482f-943d-8999a85fb1ec",
            "template": {
                "message": "{user} deleted {resource} from {space}",
                "variables": {
                    "resource": {
                        "id": "27f71740-c352-4a78-aac2-abe581a673a7$3793776a-a355-45c1-9b29-a1d2fc722ca4!160ae583-9e97-4b39-8158-e5df30325af1",
                        "name": "testavatar.png"
                    },
                    "space": {
                        "id": "27f71740-c352-4a78-aac2-abe581a673a7$3793776a-a355-45c1-9b29-a1d2fc722ca4!3793776a-a355-45c1-9b29-a1d2fc722ca4",
                        "name": "Admin"
                    },
                    "user": {
                        "id": "3793776a-a355-45c1-9b29-a1d2fc722ca4",
                        "displayName": "admin"
                    }
                }
            },
            "times": {
                "recordedTime": "2024-07-30T10:32:44.990043512Z"
            }
        },
        {
            "id": "28a2a0e4-d17d-437b-933f-51046f273a84",
            "template": {
                "message": "{user} added {resource} to {space}",
                "variables": {
                    "resource": {
                        "id": "",
                        "name": "testavatar.png"
                    },
                    "space": {
                        "id": "27f71740-c352-4a78-aac2-abe581a673a7$3793776a-a355-45c1-9b29-a1d2fc722ca4!3793776a-a355-45c1-9b29-a1d2fc722ca4",
                        "name": "Admin"
                    },
                    "user": {
                        "id": "3793776a-a355-45c1-9b29-a1d2fc722ca4",
                        "displayName": "admin"
                    }
                }
            },
            "times": {
                "recordedTime": "2024-07-30T10:30:56.310361965Z"
            }
        }
    ]
}

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions