Bug 1669269 - Tags that are changed disappear from the UI but are still present in rails
Summary: Tags that are changed disappear from the UI but are still present in rails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.9.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.1
Assignee: Keenan Brock
QA Contact: Angelina Vasileva
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On: 1666887
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-24 19:33 UTC by Satoe Imaishi
Modified: 2022-03-13 16:51 UTC (History)
5 users (show)

Fixed In Version: 5.10.1.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1666887
Environment:
Last Closed: 2019-03-06 09:50:42 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3812911 0 None None None 2019-01-24 19:33:27 UTC
Red Hat Product Errata RHBA-2019:0453 0 None None None 2019-03-06 09:50:46 UTC

Comment 2 Keenan Brock 2019-02-05 18:36:35 UTC
Handled by https://github.com/ManageIQ/manageiq/pull/18409

Comment 3 Keenan Brock 2019-02-06 17:23:30 UTC
Hammer backport: https://github.com/ManageIQ/manageiq/pull/18436

Comment 4 Angelina Vasileva 2019-02-21 09:40:09 UTC
5.10.1.1.20190212171432_83eb777 not verified

1. I added a tag and I'm able to find it in rails

irb(main):015:0> Tag.find_by(name: "/managed/location/test")
=> #<Tag id: 150, name: "/managed/location/test">


2. Then I tagged RHV VM with this tag and it's shown correctly in the UI

Smart Management
Location: test

3. Then I check rails and I don't see this tag

irb(main):019:0* Vm.find_by(:name=>"VM_NAME").ext_management_system.tags(:location)
=> #<ActiveRecord::Associations::CollectionProxy []>

Please correct me if I'm doing anything wrong here

Comment 5 Yuri Rudman 2019-02-22 14:22:53 UTC
Issue we fixed in this PR: when editing tag name system was creating new record in tags table instead of editing "name" attribute of existed one

test steps: 

1 create tag under location with name "test" and value "test_value"
2 assign tag to some vm, observe "Location: test_value" in Smart Management section of vm

3. change name of tag from "test" to "test_new" 

4. in Rails console:
         BEFORE fix:
    Tag.find_by(name: "/managed/location/test") > <Tag id: 213, name: "/managed/location/test">
    Tag.find_by(name: "/managed/location/test_new") > <Tag id: 214, name: "/managed/location/test_new">
    on VM screen: assigned tag disappeared 

         AFTER fix:     
    Tag.find_by(name: "/managed/location/test") > nil
    Tag.find_by(name: "/managed/location/test_new") > <Tag id: 213, name: "/managed/location/test_new">
    on VM screen: still the same tag "Location: test_value" in Smart Management section of vm 

Angelina, could you re-test

Comment 6 Angelina Vasileva 2019-02-22 14:54:01 UTC
@Yuri
Thanks!

Fixed and verified in 5.10.1.1.20190212171432_83eb777

Comment 8 errata-xmlrpc 2019-03-06 09:50:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0453


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