nextcloud / nextcloud/server

Allow to set the trash bin size to a percentage value of the available disk space and to reset it to the default value

Open
#22,549 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: occ feature: trashbin
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to support this request?

  • Please use the 👍 reaction to show that you are also in favor of this feature - we are using this information to decide which features to include in upcoming Nextcloud versions.
  • Please don't comment if you have no relevant information to add

Expected behavior

The new occ command (trashbin:size) should allow to set the size of the trash bin to a percentage value of the available disk space and also allow to reset the value to the default of 50%.

Current behavior

The new occ command (trashbin:size) has been introduced to configure the size of the trash bin. This currently only seems to allow to set the size to a fixed size and doesn't allow to set a percentage value of the available disk space, nor does it allow to reset the value to the default of 50% of the available disk space.

  1. I haven't found a way to reset the parameter to the default value:
    > ./occ trashbin:size -1 => The "-1" option does not exist

  2. I haven't found a way to configure a percentage value of the available disk space:
    > ./occ trashbin:size 10% => Failed to parse input size

Steps to reproduce

  1. Open a command line session
  2. Execute the given command and see what happens

Environment

Server Configuration

OS: Linux 4.9.218
Web server: Apache2 2.4.46
Database: MariaDB 10.2.24
PHP version: 7.4.8
Nextcloud version: 19.0.2

Client Configuration

Browser: Mozilla Firefox 80.0.1
Operating system: Windows 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the occ trashbin:size command entry point and trace how its fixed-size argument is parsed and stored. Check the existing trash-bin size behavior, then verify that percentage input and resetting to the 50% default work through the command; the payload names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.