Bug 1007629 - Assigned tags disappear from UI view when remove an assigned tag from the same project+category
Assigned tags disappear from UI view when remove an assigned tag from the sam...
Product: PressGang CCMS
Classification: Community
Component: Web-UI (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 1.2
Assigned To: Lee Newson
Depends On:
  Show dependency treegraph
Reported: 2013-09-12 22:18 EDT by mmurray
Modified: 2013-10-17 19:49 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-17 19:49:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description mmurray 2013-09-12 22:18:10 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 201309081012
Build 201309131104 (Next)

How reproducible:
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
Comment 1 Lee Newson 2013-09-12 22:32:05 EDT
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.
Comment 2 mmurray 2013-09-12 22:43:13 EDT
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.
Comment 3 Lee Newson 2013-09-12 23:06:43 EDT
Hey Michelle,

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)
Comment 4 Lee Newson 2013-09-15 21:37:06 EDT
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.
Comment 5 mmurray 2013-09-16 00:50:19 EDT
Fix verified for content specs + topics in Build 201309161122.
Comment 6 Lee Newson 2013-09-16 00:51:30 EDT
Thanks Michelle

Note You need to log in before you can comment on or make changes to this bug.