traggo/server

[Bug report] renaming a tag

black-fake opened this issue · 1 comments

Description:

When renaming a tag which is already in use to a name containing capital letters the name of the tag is transformed to lowercase and applied to the tag. But the already assigned events will be tagged with the original version of the new tag name. So there are 2 tags with the same name --> the mapping between the tag and the Event is somehow lost.

Example:

tag name before renaming: "this_is_a_test"
I want to rename tag to: "This_is_a_NEW_test"

=> in the tag overview there is the tag: "this_is_a_new_test"
the assigned events now have the following tag: "This_is_a_NEW_test"

==> the tag in the overview "thinks" it has never been used because it doesn't match, but the one with capital letters is not shown because there already is the same tag (just with only lowercase letters)

Steps to reproduce the behavior:

  1. create a tag
  2. create some event(s) with this tag
  3. go to: Sidebar -> Tags
  4. you see the amount of usages ( > 0 )
  5. rename the tag to something containing capital letters
  6. the usage amount dropped to 0
  7. the tag has been renamed to an all-lowercase-name
  8. go to: List or Calendar
  9. see the tag name with capital letters

Tags are normally always lowercase, it seems that the rename tag feature doesn't lower case the tag before updating the database.