Bug 1460257

Summary: Bulk assign_tags does not populate href properly
Product: Red Hat CloudForms Management Engine Reporter: Jillian Tullo <jtullo>
Component: APIAssignee: Jillian Tullo <jtullo>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Kourim <mkourim>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.8.0CC: jhardy, mkourim, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1460294 (view as bug list) Environment:
Last Closed: 2018-03-06 15:18:46 UTC Type: Bug
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:    
Bug Blocks: 1460294    

Description Jillian Tullo 2017-06-09 13:50:09 UTC
Description of problem:
When bulk assigning tags via: 

{
  "action" : "assign_tags",
  "resources" : [
    {
      "href" : "/api/vms/166",
      "tags" : [
        {
          "category" : "department",
           "name" : "finance"
        }
       ]
    }
  ]
}

The href returned is missing the ID of the object:
{
  "results": [
    {
      "success": true,
      "message": "Already tagged with Tag: category:'department' name:'finance'",
      "href": "http://localhost:3000/api/vms/",
      "tag_category": "department",
      "tag_name": "finance"
    }
  ]
}


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Satoe Imaishi 2017-06-09 15:11:00 UTC
PR: https://github.com/ManageIQ/manageiq/pull/15083

Comment 4 Martin Kourim 2017-10-24 12:12:15 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"
        }
    ]
}