We are using Jira 4.4.5
We have a Radio button field in the "Create Issue Screen" named BCP with options 'Yes' and 'No'.
When the BCP is 'Yes' then another Text field 'Reason' has to be displayed.
When the BCP is 'No' then the other Text field 'Reason' should not be displayed.
I am able to achieve this using a java script in the description of the field 'BCP'.
However the issue is that we have another Radio button 'SP' with options 'Yes' and 'No'.
And the samething, when SP = Yes, another text field 'SPReason' should be displayed. If SP=No then 'SP Reason' should not be displayed.
When i tried to write the smilar java script for the field 'SP' it is not working.
Cant we have two java scripts for two different fields in the same Create Issue page.
Please let me know how can i have the logic work for both the field 'BCP' and 'SP'.
Note these fields are mandatory fields.
Below is the java script i have used for the fied 'BCP':
<script language="JavaScript" type="text/javascript">
BCPYes = document.getElementById("customfield_11305-1");
BCPNo = document.getElementById("customfield_11305-2");
try {
window.onload =function ()
{
document.getElementById("customfield_11306").parentNode.style.display="none";
Radiochanged();
};
function Radiochanged()
{
BCPYes.onclick= function ()
{
document.getElementById("customfield_11306").parentNode.style.display="";
};
BCPNo.onclick= function ()
{
document.getElementById("customfield_11306").parentNode.style.display="none";
};
};
}
catch (err) {}
</script>
A similar script when used for the field 'SP'. It is not working.