-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
1.7.0, 1.7.1, 1.7.2, 1.8.0
-
None
-
False
-
-
False
-
-
-
Moderate
Description of problem:
Selecting conditional option doesn't properly reset values depending on another condition.
Prerequisites (if any, like setup, operators/versions):
Register the following template
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: conditional-fields
title: Conditional fields
description: Test conditional fields
spec:
parameters:
- title: Fill in some steps
properties:
condition:
type: string
enum:
- A
- B
ui:widget: radio
ui:options:
inline: true
dependencies:
condition:
allOf:
- if:
properties:
condition:
const: A
then:
properties:
extraOption:
title: Extra option for A
type: string
steps:
- id: log-extraOption
name: Print extraOption
action:
debug:log
input:
message: Condition ${{ parameters.extraOption }}
output:
text:
- title: Success
content: "Template completed"
Steps to Reproduce
- start the template
- choose condition A
- fill extra option
- choose condition B
- run the template
Actual results:
log-extraOption print the value inserted into the field extraOption before changing condition to B
Expected results:
log-extraOption step print an empty string for extraOption
Reproducibility (Always/Intermittent/Only Once):
Always
Build Details:
Additional info (Such as Logs, Screenshots, etc):
Here the ISSUE on the upstream project