Project

General

Profile

Actions

Bug #37305

closed

Remote execution ignores default values for template inputs when triggering jobs through the api

Added by Adam Ruzicka about 2 months ago. Updated 6 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Found in Releases:

Description

Steps to reproduce:
1) Import the attached job template
2) Try to run it with curl without providing a value for the foo input

curl -u admin:changeme http://foreman-r3.orb.local:5000/api/v2/job_invocations -X POST -d '{"job_invocation": {"job_template_id": 187, "search_query": "name ~ *", "targeting_type": "static_query", "inputs": {}}}' -H 'Content-Type: application/json'

Note, the template had id 187 on my box

<%#
name: Foo
snippet: false
template_inputs:
- name: foo
  required: false
  input_type: user
  advanced: false
  value_type: plain
  default: '1'
  hidden_value: false
model: JobTemplate
job_category: Miscellaneous
provider_type: script
kind: job_template
organizations:
- Default Organization
locations:
- Default Location
%>

<%= input['foo'] %>

Actions #1

Updated by The Foreman Bot about 2 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/880 added
Actions #2

Updated by The Foreman Bot 7 days ago

  • Fixed in Releases foreman_remote_execution-13.0.1 added
Actions #3

Updated by Anonymous 7 days ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Adam Ruzicka 6 days ago

  • Fixed in Releases foreman_remote_execution-13.1.0 added
  • Fixed in Releases deleted (foreman_remote_execution-13.0.1)
Actions

Also available in: Atom PDF