ocis icon indicating copy to clipboard operation
ocis copied to clipboard

We fixed the missing folder variable when folder renamed

Open 2403905 opened this issue 1 year ago • 1 comments

Description

Related Issue

  • Fixes https://github.com/owncloud/ocis/issues/10148

Motivation and Context

We fixed the missing folder variable when the folder was renamed.

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Technical debt
  • [ ] Tests only (no source changes)

Checklist:

  • [ ] Code changes
  • [ ] Unit tests added
  • [ ] Acceptance tests added
  • [ ] Documentation ticket raised:

2403905 avatar Sep 24 '24 20:09 2403905

@ScharfViktor The test case looks wrong. The description said

  Scenario: check activities after uploading a file and a folder                                            # /drone/src/tests/acceptance/features/apiActivities/activities.feature:10
    Given user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile.txt"        # FeatureContext::userHasUploadedAFileWithContentTo()
    And user "Alice" has created folder "/FOLDER"                                                           # FeatureContext::userHasCreatedFolder()
    When user "Alice" lists the activities of file "textfile.txt" from space "Personal" using the Graph API

in the logs I see that we call the activity for the FOLDER

		==> REQUEST
		PROPFIND /dav/spaces/7a1edc3e-d0c7-4852-868d-76691b229685$fc3229e6-ccd7-47fa-a015-aec93dfae5f9/FOLDER
		X-Request-ID: apiActivities/activities.feature:10-99

		<== RESPONSE
		207 Multi-Status
		X-Xss-Protection: 1; mode=block
		<== RES BODY
		<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/dav/spaces/7a1edc3e-d0c7-4852-868d-76691b229685$fc3229e6-ccd7-47fa-a015-aec93dfae5f9/FOLDER/</d:href><d:propstat><d:prop><oc:id>7a1edc3e-d0c7-4852-868d-76691b229685$fc3229e6-ccd7-47fa-a015-aec93dfae5f9!3b3bb11e-62ab-40c4-adb2-119c5ea0d373</oc:id><oc:fileid>7a1edc3e-d0c7-4852-868d-76691b229685$fc3229e6-ccd7-47fa-a015-aec93dfae5f9!3b3bb11e-62ab-40c4-adb2-119c5ea0d373</oc:fileid><oc:spaceid>7a1edc3e-d0c7-4852-868d-76691b229685$fc3229e6-ccd7-47fa-a015-aec93dfae5f9</oc:spaceid><oc:file-parent>7a1edc3e-d0c7-4852-868d-76691b229685$fc3229e6-ccd7-47fa-a015-aec93dfae5f9!fc3229e6-ccd7-47fa-a015-aec93dfae5f9</oc:file-parent><oc:name>FOLDER</oc:name><d:displayname>FOLDER</d:displayname><d:getetag>"9ef11058b7955ef02a4ec44eeac0fd11"</d:getetag><oc:permissions>RDNVCKZP</oc:permissions><d:resourcetype><d:collection/></d:resourcetype><oc:size>0</oc:size><d:getlastmodified>Thu, 26 Sep 2024 08:14:03 GMT</d:getlastmodified><oc:tags></oc:tags><oc:favorite>0</oc:favorite></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><oc:audio></oc:audio><oc:location></oc:location><oc:image></oc:image><oc:photo></oc:photo></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>

		_______________________________________________________________________

		==> REQUEST
		GET /graph/v1beta1/extensions/org.libregraph/activities
		QUERY: kql=itemid%3A7a1edc3e-d0c7-4852-868d-76691b229685$fc3229e6-ccd7-47fa-a015-aec93dfae5f9!3b3bb11e-62ab-40c4-adb2-119c5ea0d373
		X-Request-ID: apiActivities/activities.feature:10-99

		<== RESPONSE
		200 OK
		X-Xss-Protection: 1; mode=block
		<== RES BODY
		{"value":[{"id":"7aba62c8-9eb0-490d-9a61-2305f339946e","template":{"message":"{user} added {resource} to {folder}","variables":{"folder":{"id":"fc3229e6-ccd7-47fa-a015-aec93dfae5f9","name":"Alice Hansen"},"resource":{"id":"7a1edc3e-d0c7-4852-868d-76691b229685$fc3229e6-ccd7-47fa-a015-aec93dfae5f9!3b3bb11e-62ab-40c4-adb2-119c5ea0d373","name":"FOLDER"},"user":{"id":"fc3229e6-ccd7-47fa-a015-aec93dfae5f9","displayName":"Alice Hansen"}}},"times":{"recordedTime":"2024-09-26T08:14:03.277273302Z"}}]}

2403905 avatar Sep 26 '24 09:09 2403905