Open Wouter17 opened 1 month ago
Looks like this is expected behaviour. Tags with different capitalizations are considered the same tag, so it makes sense that synonyms would behave the same.
What's behind this issue? Has there been a case of a synonym not applying because someone created a tag with a different capitalization than the synonym used?
My impression from the issue description is that this is a problem with renaming a synonym during editing a tag itself, rather than changing the tags during editing a specific post.
I can reproduce the error. Here are my slightly more specific steps:
Having a tag synonym with different case than you would like does not prevent it from functioning correctly. It will work regardless of what case a user saving a post enters. However, the system does already allow changing the case of a synonym, it just requires an additional save to make it work. For this reason it seems reasonable to improve the system, to allow making the change in a single step without saving in between.
The workaround in the meantime is as follows:
I believe that the intention of this issue is to avoid this need to save twice.
Although changing the case of a synonym is never necessary in order to make it work correctly, it seems reasonable to be able to change it for clarity or to fix typos that only affect case.
For example, if I edit the tag feature-request
to make a synonym chANge-request
, then anyone adding the tag change-request
to a post will see it replaced with feature-request
, so this works correctly. However, the case listed in the tag, with accidental upper case in the middle of chANge-request
, could make someone wonder whether there is some reason for it. It would therefore be useful to be able to edit the tag synonym to instead say change-request
(with no upper case), even though this is not essential in order for it to work correctly.
It's also possible that the error could give the impression that editing the case of a synonym is not possible, because the workaround by saving twice is not obvious.
Describe the bug When removing a tag synonym, and re-adding it in the same action (so without hitting save), but with different capitalisation, it will give a "There were some errors while saving this tag: Tag synonyms A tag synonym with the name X already exists." (where the new tag name replaces X). It will also show both versions as being synonyms.
To Reproduce Steps to reproduce the behavior:
Expected behavior The new capitalisation version is saved correctly.
Screenshots After removing the old one (AD) and adding the new one (ad) and pressing "save":