Steps to reproduce
- open the "Edit Tags" modal
- create a new tag "Test"
- rename the just created tag to "Test2"
- 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?
Steps to reproduce
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 theimap_labelof the tag, which is left unchanged and after an update no longer matches thedisplay_name. Then, inMailManager::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?