Selection of All Hosts Not Retained In New Job Wizard


  1. Starting from the All Hosts page, select all hosts using the topmost checkbox
  2. Click the link that appears stating “Select all ### hosts” to check the hosts on all available pages.
  3. Click “Select Action” button in the top right corner, then choose “Schedule Remote Job” action.
  4. Select whatever Job category you want and the template you want (doesn’t matter) then click “Next”.
  5. On this screen, it evaluates the number of target hosts to zero in the “Apply to ### hosts” status. This still succeeds with the legacy form and it’s query of name != ‘’.

Expected outcome:

All selected hosts are evaluated and listed in the “Apply to ### hosts” status.

Foreman and Proxy versions:

Foreman 3.6.1

Foreman and Proxy plugin versions:

foreman-tasks 7.2.1
foreman_ansible 11.1.2
foreman_puppet 5.0.0
foreman_remote_execution 9.1.0
katello 4.8.0

Distribution and version:

Rocky Linux 8.7

Other relevant data:

In the log, it shows the following (apologies that I cannot provide the actual log, which isn’t permitted):

Processing by Api::V2::HostsController#index as JSON
  Parameters: {"search"=>"name=a AND name=b", "per_page"=>"20", "apiv"=>"v2"}

If this is the query it is running, then it is no surprise it resolves to no hosts. As stated earlier, the legacy form works fine.

Also, I can of course type in the same query that is used in the legacy form if I choose the Search query option at the top of the Target hosts and inputs step in the wizard. But this shouldn’t be necessary.