Skip to content
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

Add tags using occ command #13673

Closed
jjsp556 opened this issue Jan 18, 2019 · 17 comments
Closed

Add tags using occ command #13673

jjsp556 opened this issue Jan 18, 2019 · 17 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: occ feature: tags

Comments

@jjsp556
Copy link

jjsp556 commented Jan 18, 2019

I'd like to request the ability to add a tag to a file via occ. It is currently possible to have a workflow where files are added to Nextcloud via the command line (add file to the appropriate directory and run occ files:scan), so it would be helpful to also add a tag via the command line as well to account for rule logic that the files_automatedtagging app does not cover.

@jjsp556 jjsp556 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jan 18, 2019
@maghog
Copy link

maghog commented Jan 20, 2019

Great idea, that would be very helpful!

@aventrax
Copy link

I'm have a 90-days auto tagging rule which I use later for file auto-removal. Sometimes I need to exclude some special folder, so I'm using a tag 'retention-excluded' on the folder, doing so the 90-days tag is not being auto-applied.

Unfortunately today I create one of those special folders but I forgot to apply the "retention-excluded" tag manually. The users uploaded 2.000 files on that folder and all of them were auto-tagged with the 90-days tag! I had to remove the tag on 2.000 files, manually! This is a nightmare.

I ended up doing (after applying the missing 'retention-excluded' tag):

  1. Stop users from connecting to nextcloud
  2. Downloading all the files manually
  3. Deleting all files on my folder
  4. Uploading all the files again

Before doing so, I search for a way to bulk manage the tagged files, but I didn't find any way to do it.
I even tried to manually check the database but I was afraid to modify something directly on the database, so I left it untouched.

Any better way to do it? In my humble opinion, the 'occ' command would be very useful for this task.

Many thanks!

@szaimen
Copy link
Contributor

szaimen commented May 27, 2021

I think this was finally implemented with #26600 :)

@szaimen szaimen closed this as completed May 27, 2021
@Sim0nW0lf
Copy link

Sim0nW0lf commented Nov 3, 2021

I think this was finally implemented with #26600 :)

I don't see how this is managing file tags.
I just tried these commands and it seems like they manage tags but not corresponding files.
Here is an example:

# docker exec --user www-data nextcloud_app php occ tag:add -h                                                                                 Description:
  Add new tag

Usage:
  tag:add [options] [--] <name> <access>

Arguments:
  name                   name of the tag
  access                 access level of the tag (public, restricted or invisible)

Options:
      --output[=OUTPUT]  Output format (plain, json or json_pretty, default is plain) [default: "plain"]
  -h, --help             Display this help message
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi             Force ANSI output
      --no-ansi          Disable ANSI output
  -n, --no-interaction   Do not ask any interactive question
      --no-warnings      Skip global warnings, show command output only
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug


# docker exec --user www-data nextcloud_app php occ tag:add test public                                                                          - id: 1
  - name: test
  - access: public


# docker exec --user www-data nextcloud_app php occ tag:list                                                                                     - 1:
    - name: test
    - access: public

I would love to be able to edit file tags in bulk as well with the command line!

@noiob
Copy link
Contributor

noiob commented Jan 3, 2022

I believe that this was closed in error @szaimen

@toscka
Copy link

toscka commented Mar 30, 2022

Hi,
how can I handle tags of files via the commandline? My UseCase:
After a user has started the "approvla" workflow an the approver rejected the request, I want do delete the "rejected" for restarting the approval-Workflow.

Regards
Tobias

@noiob
Copy link
Contributor

noiob commented Mar 30, 2022

@toscka You can't, there's no command for it

@Tirguy
Copy link

Tirguy commented Apr 19, 2022

It's really a shame... We had an identical need ;-)

@toscka
Copy link

toscka commented Apr 19, 2022

We also need that - my usecase is:
I'm using the approval-workflow and if the approval is rejected, I want to be able to restart the approval of the same file, after the file has been modified by the user.

@toscka
Copy link

toscka commented Apr 19, 2022

can you implement this feature? Or add it to the backlog?

@thekk1
Copy link

thekk1 commented Dec 24, 2022

I have the same issue here.
After three years, nothing happen in this case?
It's a common thing that you want to remove something that you placed anywhere.
Is it possible to reopen and investigate this issue?

@mudi0
Copy link

mudi0 commented Mar 29, 2023

i want to use this feature too

@gonzalo
Copy link

gonzalo commented Jul 12, 2023

+1 Also for me, it would be great to have this feature as I create some shared folders from occ and bash scripts and it would be nice to be able to apply tag without having to go through the API or the gui.

@nwinkelstraeter
Copy link

@szaimen

I think this issue was closed wrongfully due to a misunderstanding of the feature request.

The PR you mentioned added the ability to create new tags using occ but the request was the ability to tag files with existing tags. (See quoted message and other comments).
I think that would be a very useful feature.

Could you reopen this issue?

Thank you :)

I think this was finally implemented with #26600 :)

I don't see how this is managing file tags. I just tried these commands and it seems like they manage tags but not corresponding files. Here is an example:

# docker exec --user www-data nextcloud_app php occ tag:add -h                                                                                 Description:
  Add new tag

Usage:
  tag:add [options] [--] <name> <access>

Arguments:
  name                   name of the tag
  access                 access level of the tag (public, restricted or invisible)

Options:
      --output[=OUTPUT]  Output format (plain, json or json_pretty, default is plain) [default: "plain"]
  -h, --help             Display this help message
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi             Force ANSI output
      --no-ansi          Disable ANSI output
  -n, --no-interaction   Do not ask any interactive question
      --no-warnings      Skip global warnings, show command output only
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug


# docker exec --user www-data nextcloud_app php occ tag:add test public                                                                          - id: 1
  - name: test
  - access: public


# docker exec --user www-data nextcloud_app php occ tag:list                                                                                     - 1:
    - name: test
    - access: public

I would love to be able to edit file tags in bulk as well with the command line!

@thekk1
Copy link

thekk1 commented Sep 15, 2023

@szaimen
..
Could you reopen this issue?
...

I would love to be able to edit file tags in bulk as well with the command line!

This will not be happened. Every issue, where I am connected too because of personal interest or having trouble with is still open after years with no reaction or closed with a denial or a excuse or a miss understanding and will not be reopened even after many comments that the moderator is wrong.
I saw never even one of my problems solved.
It's frustrating but the reality. They are more focused on build new main releases instead to solve the problems reported by the community.

@XueSheng-GIT
Copy link

While looking for a solution to use occ to tag/untag files, I stumbled over this issue (which was closed for the wrong reason).
Just want to reference the follow up which covers (again) the initial intention of this issue.
#32735

@noseshimself
Copy link

So the request was actually too narrow; we needed tag add [tag] and tag remove [tag}for tag management and tag mark [file] and tag unmark [file] (or whatever) to make everybody happy...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: occ feature: tags
Projects
None yet
Development

No branches or pull requests