Bug 1460294

Summary: Bulk assign_tags does not populate href properly
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: APIAssignee: Jillian Tullo <jtullo>
Status: CLOSED ERRATA QA Contact: Martin Kourim <mkourim>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.8.0CC: akarol, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.8.1.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1460257 Environment:
Last Closed: 2017-08-02 17:28:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1460257    
Bug Blocks:    

Comment 2 CFME Bot 2017-06-09 15:36:08 UTC
New commit detected on ManageIQ/manageiq/fine:
https://github.com/ManageIQ/manageiq/commit/f9deb1d4116713aeae5a3f95bec4a1294ba1a185

commit f9deb1d4116713aeae5a3f95bec4a1294ba1a185
Author:     Alberto Bellotti <abellotti.github.com>
AuthorDate: Mon May 22 17:19:36 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Fri Jun 9 11:33:22 2017 -0400

    Merge pull request #15083 from jntullo/bulk/incorrect_href_bulk_tag
    
    Return correct href when bulk assigning/unassigning tags
    (cherry picked from commit da20831cb3e18e74ac84c9c7ae633ca8c50783d7)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1460294

 app/controllers/api/base_controller/results.rb |  6 ++++--
 app/controllers/api/subcollections/tags.rb     |  7 +++----
 spec/requests/api/tag_collections_spec.rb      | 10 ++++++++++
 3 files changed, 17 insertions(+), 6 deletions(-)

Comment 3 Martin Kourim 2017-07-03 14:43:41 UTC
Verified that the returned href contains the ID of the object:

POST https://<aadress>/api/vms
{
  "action" : "assign_tags",
  "resources" : [
    {
      "href" : "/api/vms/:id",
      "tags" : [
        {
          "category" : "department",
          "name" : "finance"
        }
       ]
    }
  ]
}


{
    "results": [
        {
            "success": true,
            "message": "Assigning Tag: category:'department' name:'finance'",
            "href": "https://<address>/api/vms/:id",
            "tag_category": "department",
            "tag_name": "finance"
        }
    ]
}

Comment 5 errata-xmlrpc 2017-08-02 17:28:27 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:1758