[
https://issues.apache.org/jira/browse/AIRAVATA-3589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marcus Christie updated AIRAVATA-3589:
--------------------------------------
Description:
h3. Steps to reproduce:
1. Create a checkbox-input-editor with a single option with value 'yes'
(https://apache-airavata-django-portal.readthedocs.io/en/latest/admin/app_inputs/#checkboxes)
2. Set the Initial Value of the input to 'no'
3. Create a dependent input that shows when the value of the previous input has
a value of 'yes'.
4. Create an experiment from the application and try to toggle the dependent
field.
h3. Actual result
Dependent field never displays
h3. Expected Result
Dependent field should display
h3. Analysis
In debugging this locally, I see that the value of the checkbox when unchecked
is 'no', which is somewhat expected since the default value is 'no'. But when
the checkbox is checked, the value becomes 'no,yes', instead of 'yes'. It never
becomes 'yes' no matter if you check or uncheck it. Perhaps the
CheckboxInputEditor is assuming that the default value is one of the option's
values, but this may not be the case.
was:
### Steps to reproduce:
1. Create a checkbox-input-editor with a single option with value 'yes'
(https://apache-airavata-django-portal.readthedocs.io/en/latest/admin/app_inputs/#checkboxes)
2. Set the Initial Value of the input to 'no'
3. Create a dependent input that shows when the value of the previous input has
a value of 'yes'.
4. Create an experiment from the application and try to toggle the dependent
field.
### Actual result
Dependent field never displays
### Expected Result
Dependent field should display
### Analysis
In debugging this locally, I see that the value of the checkbox when unchecked
is 'no', which is somewhat expected since the default value is 'no'. But when
the checkbox is checked, the value becomes 'no,yes', instead of 'yes'. It never
becomes 'yes' no matter if you check or uncheck it. Perhaps the
CheckboxInputEditor is assuming that the default value is one of the option's
values, but this may not be the case.
> checkbox-input-editor bug when default value isn't one of the selectable
> values
> -------------------------------------------------------------------------------
>
> Key: AIRAVATA-3589
> URL: https://issues.apache.org/jira/browse/AIRAVATA-3589
> Project: Airavata
> Issue Type: Bug
> Components: Django Portal
> Reporter: Marcus Christie
> Assignee: Marcus Christie
> Priority: Major
>
> h3. Steps to reproduce:
> 1. Create a checkbox-input-editor with a single option with value 'yes'
> (https://apache-airavata-django-portal.readthedocs.io/en/latest/admin/app_inputs/#checkboxes)
> 2. Set the Initial Value of the input to 'no'
> 3. Create a dependent input that shows when the value of the previous input
> has a value of 'yes'.
> 4. Create an experiment from the application and try to toggle the dependent
> field.
> h3. Actual result
> Dependent field never displays
> h3. Expected Result
> Dependent field should display
> h3. Analysis
> In debugging this locally, I see that the value of the checkbox when
> unchecked is 'no', which is somewhat expected since the default value is
> 'no'. But when the checkbox is checked, the value becomes 'no,yes', instead
> of 'yes'. It never becomes 'yes' no matter if you check or uncheck it.
> Perhaps the CheckboxInputEditor is assuming that the default value is one of
> the option's values, but this may not be the case.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)