Bug 1198735 - applying an uploaded csv file leads leads to an incorrect redirection
Summary: applying an uploaded csv file leads leads to an incorrect redirection
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.3.0
Hardware: All
OS: All
medium
medium
Target Milestone: GA
: 5.4.0
Assignee: Martin Hradil
QA Contact: Nandini Chandra
URL:
Whiteboard:
Depends On:
Blocks: 1205219
TreeView+ depends on / blocked
 
Reported: 2015-03-04 17:35 UTC by Felix Dewaleyne
Modified: 2019-07-11 08:44 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In the previous version, after importing a csv file with tags to apply to VMs in configuration > configure > region[1] > import tags, clicking on "apply" leads to a page "The page you were looking for doesn't exist." This was because there were no GET routes for settings_import or settings_import_tags. With this release, apply button POSTs when importing csv file for tagging, not GET. As a result, the import is now successful without an error.
Clone Of:
: 1205219 (view as bug list)
Environment:
Last Closed: 2015-06-16 12:51:51 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
tag file (96 bytes, text/plain)
2015-04-27 18:14 UTC, Nandini Chandra
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description Felix Dewaleyne 2015-03-04 17:35:12 UTC
Description of problem:
After importing a csv with tags to apply to machines in configuration > configure > region[1] > import tags, clicking on "apply" leads to a page "The page you were looking for doesn't exist."

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

How reproducible:
all the time

Steps to Reproduce:
1. install cloudforms 3.1 & update to latest version
2. attach to a provider (used vmware)
3. create a category and a  few tags to apply
4. scan machines
5. go to configuration > configure > region [1] > import tags
6. upload a csv file (see sample)

Actual results:
upload works and accepts the csv but clicking on apply redirects to an incorrect location and no tag is applied

Expected results:
correct redirection and tags are applied

Additional info:
reproduced in lab using the following sample !

"name","category","entry"
"RHEL7_akotov","Test Category","Test A"

Comment 3 Dave Johnson 2015-03-05 16:47:22 UTC
Ramesh, can you please try to reproduce this.

Comment 5 Ramesh A 2015-03-11 07:03:34 UTC
Able to reproduce in  5.4.0.0.10.20150218155857_33bdc17.

Comment 6 CFME Bot 2015-03-20 19:15:44 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/63c39513e0115f1a1b08d1889f71dfda233c1112

commit 63c39513e0115f1a1b08d1889f71dfda233c1112
Author:     Martin Hradil <mhradil>
AuthorDate: Mon Mar 9 14:23:33 2015 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Mon Mar 9 14:23:33 2015 +0000

    Split AssetTagImport and ClassificationImport from miq_bulk_import.rb into their own files
    
    Prevents autoloader from failing to load ClassificationImport when referred to in session
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1198735

 vmdb/app/models/asset_tag_import.rb      | 117 ++++++++++++++++
 vmdb/app/models/classification_import.rb | 111 +++++++++++++++
 vmdb/app/models/miq_bulk_import.rb       | 230 -------------------------------
 3 files changed, 228 insertions(+), 230 deletions(-)
 create mode 100644 vmdb/app/models/asset_tag_import.rb
 create mode 100644 vmdb/app/models/classification_import.rb

Comment 7 CFME Bot 2015-03-20 19:15:47 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/cf3c62c769913154adef69b04eea5dfe89d5bac3

commit cf3c62c769913154adef69b04eea5dfe89d5bac3
Author:     Martin Hradil <mhradil>
AuthorDate: Mon Mar 9 15:56:33 2015 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Mon Mar 9 15:56:33 2015 +0000

    _x_edit_buttons - supoort apply_method - Apply needs to POST for settings_import*
    
    There are no GET routes for settings_import or settings_import_tags,
    thus the Apply button needs to POST in that case
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1198735

 vmdb/app/controllers/ops_controller.rb           | 3 ++-
 vmdb/app/views/layouts/_x_edit_buttons.html.haml | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

Comment 8 Dave Johnson 2015-03-31 16:52:13 UTC
Martin, can we cherry-pick this back to 5.3.z (5.3.4) please?

Comment 9 CFME Bot 2015-04-02 21:11:06 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=962317f25c784f8df44afe4d010cada2adcd5189

commit 962317f25c784f8df44afe4d010cada2adcd5189
Author:     Martin Hradil <mhradil>
AuthorDate: Tue Mar 24 13:16:53 2015 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Tue Mar 24 13:16:53 2015 +0000

    _x_edit_buttons - supoort apply_method - Apply needs to POST for settings_import*
    
    There are no GET routes for settings_import or settings_import_tags,
    thus the Apply button needs to POST in that case
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1198735
    (cherry-picked from cf3c62c769913154adef69b04eea5dfe89d5bac3, by hand because erb vs. haml)

 vmdb/app/controllers/ops_controller.rb          | 1 +
 vmdb/app/views/layouts/_x_edit_buttons.html.erb | 2 ++
 2 files changed, 3 insertions(+)

Comment 10 Martin Hradil 2015-04-16 13:26:44 UTC
Dave, it's done (in 5.3.5, according to bz1205219).

Comment 12 Nandini Chandra 2015-04-27 18:10:11 UTC
Verified that tags are correctly applied after importing a csv tag file.

Used the uploaded file(tag.csv) for verification.

Verified in 5.4.0.0.19.20150410165622_ad23806.

Comment 13 Nandini Chandra 2015-04-27 18:14:26 UTC
Created attachment 1019402 [details]
tag file

Comment 15 errata-xmlrpc 2015-06-16 12:51:51 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://rhn.redhat.com/errata/RHBA-2015-1100.html


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