mblakely opened a new issue, #36369:
URL: https://github.com/apache/airflow/issues/36369
### Apache Airflow version
Other Airflow 2 version (please specify below)
### If "Other Airflow 2 version" selected, which one?
2.7.3
### What happened?
In the Trigger DAG end point, using the DAG conf Parameters form will
incorrectly convert a boolean to a string when the parameter type is defined as:
```
Param(
default=None,
type=["boolean", "null"],
),
```
This can be seen by comparing the value in the field to what is produced in
the generated JSON config

If this JSON configuration is submitted, then the validation will raise an
error because "True" is not a valid boolean

Note for comparison, the "use_ndssr" field is defined as:
```
Param(
default=False,
type="boolean"
```
works as expected: the JSON config has a valid JSON boolean type and it
passes the parameter validation.
### What you think should happen instead?
When a parameter is defined as a union of boolean and null (like below), the
DAG Conf Parameters form should generate a value in the Generated JSON config
that is a boolean.
```
Param(
default=None,
type=["boolean", "null"],
),
```
It should be:
```
{
"parameter_name": true
}
```
instead of
```
{
"parameter_name": "True"
}
```
### How to reproduce
1. Create a DAG that has a parameter with these types:
```
Param(
default=None,
type=["boolean", "null"],
),
```
2. Navigate to the Trigger DAG Run for that DAG
3. Add a value of true or false in the DAG Conf Parameters form
4. Note the value in the Generated JSON config has quotes
5. Press submit, and see an error message like:

### Operating System
Ubuntu
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other Docker-based deployment
### Deployment details
_No response_
### Anything else?
This issue occurs every time the DAG Conf parameter form is used and there
is at least one parameter defined like:
```
Param(
default=None,
type=["boolean", "null"],
),
```
This issue can be worked around by directly updating the value in Generated
JSON configuration after a value has been added in the form:

Based off a similar [issue](https://github.com/apache/airflow/issues/31930)
and subsequent
[resolution](https://github.com/apache/airflow/pull/31980/commits), updates are
likely needed in (or around) `airflow/www/templates/airflow/trigger.html
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]