Bug 1304288 - Error:undefined method `>' for nil:NilClass [miq_policy/rsop] when clicked on submit button in Control->simulation
Error:undefined method `>' for nil:NilClass [miq_policy/rsop] when clicked o...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS (Show other bugs)
5.5.0
Unspecified Unspecified
high Severity medium
: GA
: 5.6.0
Assigned To: Harpreet Kataria
Aziza Karol
error
: ZStream
Depends On:
Blocks: 1306321
  Show dependency treegraph
 
Reported: 2016-02-03 04:16 EST by Aziza Karol
Modified: 2016-06-29 11:35 EDT (History)
8 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1306321 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:35:45 EDT
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)
submit button page (39.93 KB, image/png)
2016-02-03 04:16 EST, Aziza Karol
no flags Details
error (46.79 KB, image/png)
2016-02-03 04:17 EST, Aziza Karol
no flags Details

  None (edit)
Description Aziza Karol 2016-02-03 04:16:06 EST
Created attachment 1120688 [details]
submit button page

Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
1.Navigate to control simulation and click on submit button
2.
3.

Actual results:
undefined method `>' for nil:NilClass [miq_policy/rsop]  displayed in UI.see attached screenshots

Expected results:


Additional info:
production.log
[----] I, [2016-02-03T04:11:12.194287 #2977:3af994]  INFO -- : Started POST "/miq_policy/rsop?button=submit" for 127.0.0.1 at 2016-02-03 04:11:12 -0500
[----] I, [2016-02-03T04:11:12.196496 #2977:3af994]  INFO -- : Processing by MiqPolicyController#rsop as JS
[----] I, [2016-02-03T04:11:12.196623 #2977:3af994]  INFO -- :   Parameters: {"button"=>"submit"}
[----] F, [2016-02-03T04:11:12.269721 #2977:3af994] FATAL -- : Error caught: [NoMethodError] undefined method `>' for nil:NilClass
/var/www/miq/vmdb/app/controllers/miq_policy_controller/rsop.rb:20:in `rsop'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:198:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:137:in `process'
/opt/rh/cfme-gemset/gems/actionview-4.2.5.1/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_controller/metal.rb:196:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_controller/metal.rb:237:in `block in action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:74:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:43:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/router.rb:30:in `each'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/router.rb:30:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:815:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/flash.rb:260:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/query_cache.rb:36:in `call'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:38:in `call_app'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:22:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/engine.rb:518:in `call'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/application.rb:165:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/handler/thin.rb:19:in `run'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/server.rb:286:in `start'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/commands/server.rb:80:in `start'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `server'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
/opt/rh/cfme-gemset/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
/var/www/miq/vmdb/bin/rails:4:in `require'
/var/www/miq/vmdb/bin/rails:4:in `<main>'
Comment 2 Aziza Karol 2016-02-03 04:17 EST
Created attachment 1120689 [details]
error
Comment 3 Harpreet Kataria 2016-02-04 16:50:32 EST
Aziza,

I am unable to recreate this issue, can you please provide detailed steps to help recreate this issue or provide an appliance where i can recreate. In my environment 'Submit' is not available until i make selections on the screen but in your screenshot i see that 'Submit' button is available even tho you have not yet made any selections on the screen.

~Harpreet
Comment 4 Aziza Karol 2016-02-05 11:14:41 EST
Steps:
1.First navigate to control->explorer->All alert profiles
2.From configuration click on add new profile.click cancel button in the form(do not add new profile)
3.Then navigate to simulation. submit button is displayed

~Aziza
Comment 5 Harpreet Kataria 2016-02-08 17:21:16 EST
https://github.com/ManageIQ/manageiq/pull/6559
Comment 6 CFME Bot 2016-02-09 18:36:26 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ed5a343252cbc01879ece0b2484af7a9b71cc8de

commit ed5a343252cbc01879ece0b2484af7a9b71cc8de
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Mon Feb 8 17:20:10 2016 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Mon Feb 8 17:20:10 2016 -0500

    reset session[:changed] first time on Control/Simulation screen
    
    when coming from another screen sometimes session[:changed] was still set to true causing "Submit" button to be enabled when going to Control/Simulation screen first time causing it to blow up if user pressed submit button without making selections in the form.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1304288

 app/controllers/miq_policy_controller/rsop.rb      |  1 +
 .../controllers/miq_policy_controller/rsop_spec.rb | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 spec/controllers/miq_policy_controller/rsop_spec.rb
Comment 8 CFME Bot 2016-02-11 11:03:10 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=417511ff39e82e2364f15c72c1b8c4ce21c4303a

commit 417511ff39e82e2364f15c72c1b8c4ce21c4303a
Merge: c5da485 214a7fe
Author:     Dan Clarizio <dclarizi@redhat.com>
AuthorDate: Thu Feb 11 10:54:21 2016 -0500
Commit:     Dan Clarizio <dclarizi@redhat.com>
CommitDate: Thu Feb 11 10:54:21 2016 -0500

    Merge branch '55z_pr_6559' into '5.5.z'
    
    reset session[:changed] first time on Control/Simulation screen
    
    when coming from another screen sometimes session[:changed] was still set to true causing "Submit" button to be enabled when going to Control/Simulation screen first time causing it to blow up if user pressed submit button without making selections in the form.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1304288
    https://bugzilla.redhat.com/show_bug.cgi?id=1306321
    (cherry picked from commit ed5a343)
    
    @dclarizi please review, clean cherry-pick for https://github.com/ManageIQ/manageiq/pull/6559
    
    See merge request !776

 app/controllers/miq_policy_controller/rsop.rb      |  1 +
 .../controllers/miq_policy_controller/rsop_spec.rb | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)
Comment 9 CFME Bot 2016-02-11 11:03:38 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=214a7fe25568f3da3a20bd5173797dc724217130

commit 214a7fe25568f3da3a20bd5173797dc724217130
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Mon Feb 8 17:20:10 2016 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed Feb 10 14:15:33 2016 -0500

    reset session[:changed] first time on Control/Simulation screen
    
    when coming from another screen sometimes session[:changed] was still set to true causing "Submit" button to be enabled when going to Control/Simulation screen first time causing it to blow up if user pressed submit button without making selections in the form.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1304288
    https://bugzilla.redhat.com/show_bug.cgi?id=1306321
    (cherry picked from commit ed5a343)

 app/controllers/miq_policy_controller/rsop.rb      |  1 +
 .../controllers/miq_policy_controller/rsop_spec.rb | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 spec/controllers/miq_policy_controller/rsop_spec.rb
Comment 11 CFME Bot 2016-02-15 10:42:25 EST
Detected commit referencing this ticket while ticket status is MODIFIED.
Comment 12 Aziza Karol 2016-04-18 05:12:41 EDT
No error when clicked on submit button in Control->simulation when navigated from other screens.

Verified version:5.6.0.1-beta2.20160413141124_e25ac0e
Comment 14 errata-xmlrpc 2016-06-29 11:35:45 EDT
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/RHBA-2016:1348

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