Bug 1497746 - Editing Name of a Category via API breaks Chargeback Assignments
Summary: Editing Name of a Category via API breaks Chargeback Assignments
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
medium
urgent
Target Milestone: GA
: 5.8.2
Assignee: Gregg Tanzillo
QA Contact: Nandini Chandra
URL:
Whiteboard: chargeback
Depends On: 1483365
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-02 14:56 UTC by Satoe Imaishi
Modified: 2017-10-24 00:41 UTC (History)
6 users (show)

Fixed In Version: 5.8.2.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1483365
Environment:
Last Closed: 2017-10-24 00:41:44 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3005 normal SHIPPED_LIVE Important: Red Hat CloudForms security, bug fix, and enhancement update 2017-10-24 04:15:49 UTC

Comment 2 CFME Bot 2017-10-02 15:01:17 UTC
New commit detected on ManageIQ/manageiq/fine:
https://github.com/ManageIQ/manageiq/commit/6b8f0a802346f37c89143114135d0fce1440189f

commit 6b8f0a802346f37c89143114135d0fce1440189f
Author:     Joe Rafaniello <jrafanie@users.noreply.github.com>
AuthorDate: Fri Sep 29 14:00:32 2017 -0400
Commit:     Satoe Imaishi <simaishi@redhat.com>
CommitDate: Mon Oct 2 10:57:51 2017 -0400

    Merge pull request #16039 from gtanzillo/delete-tag-assignments
    
    Delete tag assignments when deleting a tag that is referenced in an assignment
    (cherry picked from commit fc67deb5c3a1eca38574e9001ec52f933da0b112)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1497746

 app/models/classification.rb                | 16 +++++++--
 app/models/mixins/assignment_mixin.rb       | 11 +++++-
 spec/models/classification_spec.rb          | 56 +++++++++++++++++++++++++----
 spec/models/mixins/assignment_mixin_spec.rb | 18 ++++++++++
 4 files changed, 91 insertions(+), 10 deletions(-)

Comment 3 Nandini Chandra 2017-10-06 21:25:26 UTC
Before fix:

1)Create a custom category, cat1.Add a tag, tag1 for the category.
2)Assign tag1 to a VM
3)Chargeback assignments , make these selections: 
  Assign to:    Tagged VMs and instances
  Tag Category: cat1
  Selections Name: cat1; rate: Default
4)Delete tag1 
5)Unable to edit chargeback assignments and error message in logs:


After fix

1)Create a custom category, cat1.Add a tag, tag1 for the category.
2)Assign tag1 to a VM
3)Chargeback assignments , make these selections: 
  Assign to:    Tagged VMs and instances
  Tag Category: cat1
  Selections Name: cat1; rate: Default
4)Delete tag1
5)No errors in logs  and it should be possible to edit chargeback assignments

Comment 4 Nandini Chandra 2017-10-06 21:25:58 UTC
Verified in 5.8.2.2

Comment 6 errata-xmlrpc 2017-10-24 00:41:44 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-2017:3005


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