Bug #15875
Updated by Ivan Necas almost 8 years ago
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1358425 Description of problem: If a user, that has no hosts, attempts to preview a Job Template they are presented with the following error: "Warning! Problem with previewing the template: error during rendering: undefined method 'operatingsystem' for NilClass::Jail (NilClass). Note that you must save template input changes before you try to preview it." A more helpful error should replace the undefined method error. Steps to Reproduce: 1. Have no hosts assigned to the testing Organization. 2. Navigate to job templates 3. Open one up, and click the 'Preview' button. Actual results: "Warning! Problem with previewing the template: error during rendering: undefined method 'operatingsystem' for NilClass::Jail (NilClass). Note that you must save template input changes before you try to preview it." Expected results: A more appropriate error message is presented. The same behaviou can be observed when a job is invoced against an empty set of hosts