Bug 746628 - Error when clicking "Apply selected plan to selected products" when no plan and product is selected
Summary: Error when clicking "Apply selected plan to selected products" when no plan a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: Unspecified
Assignee: Shannon Hughes
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-10-17 10:38 UTC by Sachin Ghai
Modified: 2019-09-26 13:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:01:33 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Sachin Ghai 2011-10-17 10:38:31 UTC
Description of problem:
I synched a custom repo and tried to schedule the hourly sync for that repo.

However when i clicked the "Apply selected plan to selected products" under "sync management ==> sync schedule, following error is appeared on UI:

---
500 Internal Server Error

Sorry about that! It seems something went wrong. If you continue having trouble with this, please contact an Administrator.

You might want to log out and log back in again to clear your cookies.
Error:

    undefined method `collect' for nil:NilClass

----


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

root@dhcp201-158 ~]# rpm -qa | grep katello
katello-cli-0.1.10-1.git.712.be6830e.fc15.noarch
katello-0.1.93-1.git.0.6934d37.fc15.noarch
katello-all-0.1.93-1.git.0.6934d37.fc15.noarch
katello-configure-0.1.6-1.git.5.76ba627.fc15.noarch
katello-repos-0.1.3-1.git.0.db2bd1d.fc15.noarch
[root@dhcp201-158 ~]# rpm -qa | grep pulp
pulp-common-0.0.237-5.fc15.noarch
pulp-0.0.237-5.fc15.noarch
m2crypto-0.21.1.pulp-5.fc15.x86_64
[root@dhcp201-158 ~]# 

How reproducible:
always

Steps to Reproduce:
1. Create a repo
2. sync it
3. create a sync plan 
4. Now click on "Apply selected plan to selected products" without "selecting any plan and product
  
Actual results:
undefined method `collect' for nil:NilClass

Expected results:
Button should be disabled if no sync plan and product is selected or a proper error message should be raised, saying that please select defined sync plan and product.

Additional info:

Comment 1 Jeff Weiss 2011-10-18 16:26:34 UTC
Also happens when products are selected but no plan.

Comment 2 Shannon Hughes 2012-01-09 19:17:22 UTC
added error messages for when products/plans are not selected, 

037e109..3c7e198  master -> master

Comment 3 Sachin Ghai 2012-01-18 11:19:39 UTC
Verified with following katello build:

[root@dhcp201-176 ~]# rpm -qa | grep katello
katello-glue-candlepin-0.1.178-1.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-common-0.1.178-1.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-repos-testing-0.1.5-1.el6.noarch
katello-cli-0.1.35-1.el6.noarch
katello-0.1.178-1.el6.noarch
katello-configure-0.1.53-1.el6.noarch
katello-glue-pulp-0.1.178-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-common-0.1.35-1.el6.noarch
katello-certs-tools-1.0.2-1.el6.noarch
katello-all-0.1.178-1.el6.noarch
katello-glue-foreman-0.1.178-1.el6.noarch
katello-repos-0.1.5-1.el6.noarch


Now proper error messages are raised as below when neither product nor any sync plan is selected.

"There must be at least one product selected"

Also if either of them is selected but not both.

like:

i) if product is selected but not the sync plan, following message raised:

"There must be at least one plan selected"

ii) if sync plan is selected but not the product then:

"There must be at least one product selected"




so moving this to verified.


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