Skip to content

"Default quota" incorrectly displayed in administrator settings #21085

Closed

Description

@Valdnet

Steps to reproduce

  1. Log in as an administrator.
  2. Select from the "Users" settings.
  3. Edit user settings.
  4. Change "Quota" to "Default quota".
  5. Save settings.

Expected behaviour

Correct display of the "Default quota".

Actual behaviour

The default limit is displayed as "0 B".

obraz

Nextcloud version: (see Nextcloud admin page)
19.0.0 RC2 and 18.0.4

Activity

  1. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on May 24, 2020
  2. Valdnet commented on Oct 26, 2020

    @Valdnet
    ContributorAuthor

    The bug still hasn't been removed even though we already have Nextcloud 20.0.1.
    @MorrisJobke Who to contact about correcting the code?

  3. MorrisJobke commented on Oct 26, 2020

    @MorrisJobke
    Member
  4. PVince81 commented on Oct 27, 2020

    @PVince81
    Member

    Confirmed still happening in NC 20.0.0.

    I guess that maybe the value isn't properly evaluated in the users list.

  5. added
    1. to developAccepted and waiting to be taken care of
    and removed
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Oct 27, 2020
  6. PVince81 commented on Oct 27, 2020

    @PVince81
    Member

    Right, and once I refresh the page it displays the actual default value in GB instead of just saying "Default quota".
    And when I change the default quota on the left panel, it doesn't refresh every entry in the list.

  7. PVince81 commented on Oct 27, 2020

    @PVince81
    Member

    Hmm there's a discrepancy in the data:

    the server populates the "quota" value with the same like "total" when a default quota is set:
    image

    it's only when directly setting default quota that it becomes "default" locally. but upon next refresh, the server value will override it.

    so will need to adjust the server to return the string "default" instead of a value

  8. skjnldsv commented on Oct 27, 2020

    @skjnldsv
    Member

    I decided to not bother with this a long time ago (nc14 I think?)
    Default quota will apply the default quota, but not display it. It's been like that since a long time and it's the cleaner way imho. Let's not bother handling string and numbers, just display the actual value of what "default quota" is. This was also requested by users as otherwise you don't always know what it refers to.

  9. MorrisJobke commented on Oct 27, 2020

    @MorrisJobke
    Member

    Regarding default quota there is also #11393 and #13909 where we tried to improve the default quota as well. It had some tricky side effects and for that reason wasn't continued.

  10. skjnldsv commented on Oct 27, 2020

    @skjnldsv
    Member

    Also, remember this endpoint is also used by other apps/clients that might actually need the exact quota byte count. I would refrain from touching this.

  11. PVince81 commented on Oct 27, 2020

    @PVince81
    Member

    Yeah, I'm also worried about API breakage...

    So the quick fix is that after applying the default storage upon edit, the string will display the matching size value. And after refresh you'll see the same value. This way it looks consistent.

  12. PVince81 commented on Oct 27, 2020

    @PVince81
    Member

    Also: when the default quota is "unlimited", the server returns "-3" for the quota (instead of "none") so "0 B" appears as well.

  13. self-assigned this
    on Oct 27, 2020
  14. added this to the Nextcloud 21 milestone on Oct 27, 2020
  15. PVince81 commented on Oct 27, 2020

    @PVince81
    Member

    PR here: #23711

    I also fixed the "-3" issue there in case of unlimited default quota.

  16. Valdnet commented on Oct 27, 2020

    @Valdnet
    ContributorAuthor

    @MorrisJobke @PVince81 @skjnldsv Thank you for your interest and the quick fix🥇.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions