nextcloud / nextcloud/mail

Unable to unselect Default Folder

Open
#13,319 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug enhancement feature:mailbox-management
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce
  • go to Account settings -> Default folders
  • open selection for any option (e.g. "Drafts are saved in:")
  • press Backspace in order to invalidate selection
  • the combobox now says "Select...", and implies that the default folder has been unselected
  • reload the page, and go back to Account settings -> Default folders
Expected behavior

The blanked default folder type is unselected.

Actual behavior

I find the previous value assigned to the manipolated default folder.

Mail app version

5.10

Nextcloud version

No response

Mailserver or service

No response

Operating system

No response

PHP engine version

None

Nextcloud memory caching

No response

Web server

None

Database

None

Additional info

In those conditions, this.mainStore.patchAccount issues a call to /apps/mail/api/accounts/1 with an empty payload, which doesn't implies any actual change on backend.

But the real question is: is it possible at all to unassigned a default folder?

If yes: some fix is required to submit a "empty this selection" to the backend.
If not: frontend must impede to unselect that selection.

I've found this issue working on #13318, which still includes the same problem (as I didn't know how to handle this scenario).

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 in the Default folders settings flow and trace the mainStore.patchAccount call to /apps/mail/api/accounts/1 when a selection is cleared. Determine whether an empty default-folder value can be persisted; done means either the cleared value survives reload or the UI prevents unselecting it, with the behavior from #13318 considered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.