nextcloud / nextcloud/files_automatedtagging
Parent folder of uploaded files and folders also gets tagged
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 56
- Forks
- 23
- Avg merge
- 19h 16m
- Merged PRs (30d)
- 48
Description
I have the exact same problem as described in https://github.com/nextcloud/files_automatedtagging/issues/87
The "fix" suggested by @nickvergessen does not really solve the problem!
I need the ability to upload folders which automatically get tagged, as well as the option to exclude the parent folder from beeing automatically tagged. There should be either be an option to exclude the parent folder, or any folder a user wishes. Im not sure how the folders to be exlcuded should be selected/defined.
File MIME type > is not > httpd/unix-directory is not a real fix to this problem as it stopps the ability from folders beeing auto tagged and deleted inside the parent folder.
Steps to reproduce
- Set a tag "1dayRetention" to be automatically added to files and folders tagged with "parentfolder"
- Create folder "tempdir"
- Tag folder "tempdir" with tag "parentfolder"
- Upload files and folders into the folder "tempdir"

Expected behaviour
All files and folders which are uploaded to the parent directory called "tempdir" should be tagged with the tag "1dayRetention". But the parent directory called "tempdir" should not be tagged with the tag "1dayRetention"
tempdir/ [parentfolder]
├── project1/ [1dayRetention]
│ ├── file1.txt [1dayRetention]
│ ├── file2.txt [1dayRetention]
├── file3.txt [1dayRetention]
Actual behaviour
All files and folders which are uploaded to the parent directory called "tempdir" get tagged with the tag "1dayRetention" including the parent directory called "tempdir" itself. Which results in the deletion of the parent directory.
tempdir/ [parentfolder][1dayRetention]
├── project1/ [1dayRetention]
│ ├── file1.txt [1dayRetention]
│ ├── file2.txt [1dayRetention]
├── file3.txt [1dayRetention]
Server configuration
Operating system:
Debian 10
Web server:
Apache
Database:
MariaDB
PHP version:
7.3.11
Nextcloud version: (see Nextcloud admin page)
17.0.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the listed automated-tagging rule and upload steps, then compare the expected and actual tag trees. Determine how an exclusion option should be selected or defined, and verify that child files and folders remain tagged while the parent folder does not.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100