Bug 1460257 - Bulk assign_tags does not populate href properly
Summary: Bulk assign_tags does not populate href properly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 5.9.0
Assignee: Jillian Tullo
QA Contact: Martin Kourim
URL:
Whiteboard:
Depends On:
Blocks: 1460294
TreeView+ depends on / blocked
 
Reported: 2017-06-09 13:50 UTC by Jillian Tullo
Modified: 2018-03-06 15:18 UTC (History)
4 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1460294 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:18:46 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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"
        }
    ]
}


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