Bug #6276
closedCouldn't update versions for package rules defined under package filters
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1106378
Description of problem:
I created a package filter and defined a package rule that filter should include a package zsh whose version equal to = '2.2'
Later I tried to update the version from 'Equal To' to 'Greater Than', UI neither saves the changes nor raises any error. Seems like updation is not working.
And production.log is throwing following error:
Processing by Katello::Api::V2::ContentViewFilterRulesController#update as JSON
Parameters: {"id"=>"1", "name"=>"zsh", "created_at"=>"2014-06-09T07:05:51Z", "updated_at"=>"2014-06-09T08:13:40Z", "content_view_filter_id"=>"2", "version"=>"2.2", "type"=>"greater", "editMode"=>true, "min_version"=>"2.2", "working"=>false, "api_version"=>"v2", "content_view_filter_rule"=>{"id"=>"1", "name"=>"zsh", "created_at"=>"2014-06-09T07:05:51Z", "updated_at"=>"2014-06-09T08:13:40Z", "content_view_filter_id"=>"2", "version"=>"2.2", "type"=>"greater", "editMode"=>true, "min_version"=>"2.2", "working"=>false}}
ActiveRecord::RecordInvalid
base: ["Invalid filter rule specified, 'version' cannot be specified in the same tuple as 'min_version' or 'max_version'"]
Completed 422 Unprocessable Entity in 50ms (Views: 0.8ms | ActiveRecord: 2.7ms)
Version-Release number of selected component (if applicable):
sat6 beta snap8 (Satellite-6.0.3-RHEL-6-20140604.0)
How reproducible:
always
Steps to Reproduce:
1. create package filter
2. add rule to filter package with name zsh and version 'Equal To' 2.2
3. now edit this rule and change version 'Greater Than' value '2.2'
4. click save
Actual results:
couldn't update the version of selected package rule. Firebug throws NetworkError.
Expected results:
Either UI should throw proper error or update the version for selected package rule.
Additional info: