Bug 1648948 - Tags responding to `show` with true and having no classification produce 500-level errors for URL of `/api/tags?expand=resources&attributes=category,categorization`
Summary: Tags responding to `show` with true and having no classification produce 500-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.9.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.9.6
Assignee: Julian Cheal
QA Contact: Parthvi Vala
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On: 1632901
Blocks: 1622587
TreeView+ depends on / blocked
 
Reported: 2018-11-12 14:27 UTC by Satoe Imaishi
Modified: 2022-07-09 10:15 UTC (History)
11 users (show)

Fixed In Version: 5.9.6.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1632901
Environment:
Last Closed: 2018-12-13 15:15:49 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3816 0 None None None 2018-12-13 15:15:58 UTC

Comment 2 CFME Bot 2018-11-12 18:25:53 UTC
New commit detected on ManageIQ/manageiq/gaprindashvili:

https://github.com/ManageIQ/manageiq/commit/50d3412e5425fb46a93fb2afed837f30d3ab2c17
commit 50d3412e5425fb46a93fb2afed837f30d3ab2c17
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Fri Nov  9 13:35:27 2018 -0500
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Fri Nov  9 13:35:27 2018 -0500

    Merge pull request #18177 from juliancheal/fix_tags_without_classifications_errors

    Tags without a classification cause errors

    (cherry picked from commit 3217a89bb0d0c76d7a482eada25e93e4f35ae2f4)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1648948

 app/models/tag.rb | 8 +-
 spec/models/tag_spec.rb | 12 +
 2 files changed, 16 insertions(+), 4 deletions(-)

Comment 3 Parthvi Vala 2018-11-20 09:03:49 UTC
Hi Julian,

I need some information on reproducing this bug. From what I understand, I need to create a tag without any description to reproduce this bug. But there's no possible way to do so either via UI or API. What am I missing here? Can you help me with the steps to reproduce it?


Thanks,
Parthvi

Comment 5 Parthvi Vala 2018-11-26 15:48:45 UTC
FIXED. Verified on 5.9.6.2.20181119175512_3a18916.

Steps taken to verify:
1) Create a category and tag.
2) SSH into appliance, `vmdb`, and `bin/rails c`.
3) Get the required tag with: 
        tag = Tag.find_by(name: "/managed/cat_1/tag_1"
4) Delete the classification associated with tag.
        tag.classification.delete
5) Send a request. 
GET /api/tags?expand=resources&attributes=category,categorization

There was no internal server error or any error in the API log, unlike the version in which this BZ was released(5.9.4.7).

Comment 7 errata-xmlrpc 2018-12-13 15:15:49 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-2018:3816


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