Bug 1668730 - 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.9.9
Assignee: Yuri Rudman
QA Contact: Angelina Vasileva
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On: 1666887
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-23 13:06 UTC by Yuri Rudman
Modified: 2022-07-09 10:24 UTC (History)
4 users (show)

Fixed In Version: 5.9.9.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1666887
Environment:
Last Closed: 2019-03-19 07:22:13 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0600 0 None None None 2019-03-19 07:22:18 UTC

Comment 2 Yuri Rudman 2019-01-23 13:10:14 UTC
PR: https://github.com/ManageIQ/manageiq/pull/18378

Comment 3 Yuri Rudman 2019-01-23 16:41:56 UTC
above PR (https://github.com/ManageIQ/manageiq/pull/18378) is closed in favor of https://github.com/ManageIQ/manageiq/pull/18387

Comment 4 Satoe Imaishi 2019-01-25 17:27:24 UTC
https://github.com/ManageIQ/manageiq/pull/18386

Comment 5 Satoe Imaishi 2019-01-29 16:56:06 UTC
PR 18386 was reverted:

commit 5fdf7387539d43ea39031adc8ecb91926855fc33
Author: Satoe Imaishi <simaishi>
Date:   Tue Jan 29 11:47:39 2019 -0500

    Revert "Merge pull request #18386 from yrudman/gaprindashvili-fixed-saving-tag-name"
    
    This reverts commit ac3a51ed367e9be4f6f89d944ec8e3b98f13c889, reversing
    changes made to 5d837f5765bb4a6d28589bd2536d4c7d09547caf.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1668730

Comment 7 Satoe Imaishi 2019-02-11 21:46:48 UTC
Backported to gaprindashvili branch:

commit 3b7bfa7f38e8d3a8bc45907a90b6d0aae6170a71
Author: Satoe Imaishi <simaishi>
Date:   Thu Feb 7 16:25:57 2019 -0500

    Merge pull request #18436 from kbrock/tag_name_updates_hammer
    
    [HAMMER] Allow Tag names to be updated
    
    (cherry picked from commit ffe2069a7c00c568824a45c5261cc8f041592027)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1668730

Comment 8 CFME Bot 2019-02-13 04:31:20 UTC
New commit detected on ManageIQ/manageiq/gaprindashvili:

https://github.com/ManageIQ/manageiq/commit/3b7bfa7f38e8d3a8bc45907a90b6d0aae6170a71
commit 3b7bfa7f38e8d3a8bc45907a90b6d0aae6170a71
Author:     Satoe Imaishi <simaishi>
AuthorDate: Thu Feb  7 16:25:57 2019 -0500
Commit:     Satoe Imaishi <simaishi>
CommitDate: Thu Feb  7 16:25:57 2019 -0500

    Merge pull request #18436 from kbrock/tag_name_updates_hammer

    [HAMMER] Allow Tag names to be updated

    (cherry picked from commit ffe2069a7c00c568824a45c5261cc8f041592027)

    https://bugzilla.redhat.com/show_bug.cgi?id=1668730

 app/models/classification.rb | 7 +-
 spec/factories/classification.rb | 16 +-
 spec/models/classification_spec.rb | 67 +
 3 files changed, 79 insertions(+), 11 deletions(-)

Comment 9 CFME Bot 2019-02-15 03:50:23 UTC
New commit detected on ManageIQ/manageiq/gaprindashvili:

https://github.com/ManageIQ/manageiq/commit/00a6a3cbd2981f6cc93368154c675ee791f9b794
commit 00a6a3cbd2981f6cc93368154c675ee791f9b794
Author:     Yuri Rudman <yrudman>
AuthorDate: Wed Jan 23 10:14:24 2019 -0500
Commit:     Yuri Rudman <yrudman>
CommitDate: Wed Jan 23 10:14:24 2019 -0500

    Do not create new record in Tag table when editing existing tag
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1668730

 app/models/classification.rb | 7 +-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comment 10 CFME Bot 2019-02-15 08:45:39 UTC
New commit detected on ManageIQ/manageiq/gaprindashvili:

https://github.com/ManageIQ/manageiq/commit/5fdf7387539d43ea39031adc8ecb91926855fc33
commit 5fdf7387539d43ea39031adc8ecb91926855fc33
Author:     Satoe Imaishi <simaishi>
AuthorDate: Tue Jan 29 11:47:39 2019 -0500
Commit:     Satoe Imaishi <simaishi>
CommitDate: Tue Jan 29 11:47:39 2019 -0500

    Revert "Merge pull request #18386 from yrudman/gaprindashvili-fixed-saving-tag-name"

    This reverts commit ac3a51ed367e9be4f6f89d944ec8e3b98f13c889, reversing
    changes made to 5d837f5765bb4a6d28589bd2536d4c7d09547caf.

    https://bugzilla.redhat.com/show_bug.cgi?id=1668730

 app/models/classification.rb | 6 +-
 spec/models/classification_spec.rb | 25 -
 2 files changed, 1 insertion(+), 30 deletions(-)

Comment 11 Angelina Vasileva 2019-03-05 09:05:38 UTC
Fixed and verified in 5.9.9.0.20190225180110_28a581b

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 (vmdb && bin/rails c):
         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

Comment 13 errata-xmlrpc 2019-03-19 07:22:13 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/RHSA-2019:0600


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