Red Hat Bugzilla – Bug 1007629
Assigned tags disappear from UI view when remove an assigned tag from the same project+category
Last modified: 2013-10-17 19:49:37 EDT
Description of problem:
'Remove' button appears to remove all tags corresponding to the same project+category not just the tag corresponding to the specific 'Remove' button. Subsequently trying to readd tags that shouldn't have been removed gives an error message and indicates that the UI is showing the incorrect info.
Version-Release number of selected component (if applicable):
Build 201309131104 (Next)
100% until save some new tag changes and then seems to be fixed?
Steps to Reproduce:
1. Pick a content spec with Release tag already assigned (e.g., id 22434).
2. Click Tag tab.
3. Add another Release tag (e.g., JBDS 7.0.0 - frozen) > tag is added, all good
4. Remove original Release tag (e.g., JBDS 7.0.z) > both tags appear to be removed
5. Try to re add desired Release tag (JBDS 7.0.0 - frozen) > message 'The tag was not added because it is already assigned to the topic.'
6. Try to re add original Release tag (JBDS 7.0.z) > both tags are listed again
1. Pick a content spec with Release tag already assigned (e.g., id 22433).
2. Click Tag tab.
3. Remove original Release tag > tag is removed, all good
4. Add a new Release tag > nothing appears to happen
Can also reproduce with Book tag.
Conditions under which error occurs:
content spec must have tags assigned already (+ have been saved)
+ add a tag from a project+category that already has a tag assigned
+ remove original tag from that same project+category
Potential work around:
Add new tag, save, and then remove original tag
The first part is not a bug and is just how the data is displayed (it needs reworking to be honest), as a Tag is assigned to a Topic. When it is presented however it's starting point is a "Project", which is just a grouping and a tag can belong to multiple projects. So when you remove a tag you are going to remove the singular instance from the topic but it'll disappear from the UI for all matching projects.
As for the other part I can reproduce it and again it's relevant to both Topic and Content Spec views.
Lee, I'm not following what you mean by first/second part? Is this corresponding to the 'steps to reproduce' (first part?) and 'also' (second part?) text? I might not have written the description correctly as to me the two examples (steps to reproduce + also) look like the same underlying issue.
Sorry ignore the first part it was a misunderstanding of the description on my part.
For what it's worth I was referring to, say having the "Hibernate" tag which is included in three projects, as such it shows up three times in the Tags view, however removing anyone of those will remove all three (since they are really the same entity)
Fixed in Build 201309161122.
This was caused by using the equals method on the RESTProjectV1 class, however it takes into account revision and id. However in this instance we are only interested in the id and not the revision, as such I've fixed it so that it checks if the project using a mechanism that only checks against the id.
Note: This version is currently live on the PressGang Next instance.
Fix verified for content specs + topics in Build 201309161122.