Bug 1460257 - Bulk assign_tags does not populate href properly
Bulk assign_tags does not populate href properly
Status: CLOSED CURRENTRELEASE
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API (Show other bugs)
5.8.0
Unspecified Unspecified
unspecified Severity unspecified
: GA
: 5.9.0
Assigned To: Jillian Tullo
Martin Kourim
: TestOnly, ZStream
Depends On:
Blocks: 1460294
  Show dependency treegraph
 
Reported: 2017-06-09 09:50 EDT by Jillian Tullo
Modified: 2018-03-06 10:18 EST (History)
4 users (show)

See Also:
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 10:18:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jillian Tullo 2017-06-09 09:50:09 EDT
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 11:11:00 EDT
PR: https://github.com/ManageIQ/manageiq/pull/15083
Comment 4 Martin Kourim 2017-10-24 08:12:15 EDT
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"
        }
    ]
}

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