Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow regex for MiqExpression::Field which contains numbers in associations #14229

Conversation

lpichler
Copy link
Contributor

@lpichler lpichler commented Mar 8, 2017

example of field: Vm.win32_services-dependencies

steps to reproduce a bug:

  1. create new report based on VM and Instance
  2. add field Vm.win32_services-dependencies
  3. got to tab field
  4. Add condition with field
  5. Try to add column Vm.win32_services-dependencies to expression
    and then it throws error:
[----] F, [2017-03-08T15:37:11.295501 #1604:3fd43e42e33c] FATAL -- : Error caught: [NoMethodError] undefined method `plural?' for nil:NilClass
/Users/liborpichler/manageiq/manageiq-ui-classic/app/controllers/application_controller/filter/expression.rb:172:in `update_from_expression_editor'
/Users/liborpichler/manageiq/manageiq-ui-classic/app/controllers/application_controller/filter.rb:132:in `exp_changed'
/usr/local/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/usr/local/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/abstract_controller/base.rb:188:in `process_action'
/usr/local/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_controller/metal/rendering.rb:30:in `process_action'
/usr/local/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/usr/local/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:126:in `call'
/usr/local/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/usr/local/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:455:in `call'
/usr/local/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:101:in `__run_callbacks__'

@miq-bot assign @gtanzillo
@miq-bot add_label bug, core

cc @kbrock @imtayadeway

example of field: Vm.win32_services-dependencies
@@ -70,6 +70,13 @@
tag = "Vm.hosts.user_tag-name"
expect(described_class.parse(tag)).to be_nil
end

it 'parses field with numbers in column' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't the numbers in the association?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh good :eyes I don't know why I am talking about column when the bug is in association

(I am not aware about numbers in colums, at least for now :) )

thanks!!!
I am going to fix descriptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@imtayadeway imtayadeway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit

@lpichler lpichler changed the title Allow regex for MiqExpression::Field which contains numbers in column Allow regex for MiqExpression::Field which contains numbers in assocations Mar 8, 2017
@lpichler lpichler changed the title Allow regex for MiqExpression::Field which contains numbers in assocations Allow regex for MiqExpression::Field which contains numbers in associations Mar 8, 2017
@lpichler lpichler force-pushed the accept_numbers_in_column_from_miq_expression_field branch from f29fe2c to 1908983 Compare March 8, 2017 15:46
@miq-bot
Copy link
Member

miq-bot commented Mar 8, 2017

Checked commits lpichler/manageiq@5a924c6~...1908983 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks good. 👍

@kbrock kbrock assigned kbrock and unassigned gtanzillo Mar 10, 2017
@kbrock kbrock added this to the Sprint 56 Ending Mar 13, 2017 milestone Mar 10, 2017
@kbrock kbrock merged commit f340d71 into ManageIQ:master Mar 10, 2017
@lpichler lpichler deleted the accept_numbers_in_column_from_miq_expression_field branch March 10, 2017 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants