Skip to content

Renaming tag do not rename tag's IMAP label #13275

Description

@madbob

Steps to reproduce

  1. open the "Edit Tags" modal
  2. create a new tag "Test"
  3. rename the just created tag to "Test2"
  4. create again a new tag "Test"

Expected behavior

"Test" tag appears on the list, together "Test2"

Actual behavior

"Test2" is replicated in the list, and no "Test" is created (even in the database).

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

MailManager::updateTag() doesn't update also the imap_label of the tag, which is left unchanged and after an update no longer matches the display_name. Then, in MailManager::createTag(), the tag is checked for existance using imap_label and when the old value is found the method do not proceed, returning data about the old (and then renamed) tag.

I'm not sure about the correct behavior to apply when updating a tag. Should the tag be entirely updated, and existing and tagged messages should be updated to the new permanent flag? Or an allocated imap_label is no longer assignable, and the condition should be handled to stop the user trying to recreate the same label?

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions