Hi,
https://confluence.atlassian.com/display/JIRA/Displaying+a+Field+Based+on+Another+Field+Selection
I am using above link to manipulate the value of the custom field based on some other custom field values in the javascript code. The problem I am facing is that once I open a screen where the below custom field is shown, it doesn't take the formula below. But once I open the screen again, it takes the formula below.
Please help me in resolving this.
Regards
Deepak Bhatia
============================================================================
if(document.getElementById('customfield_10163').options[document.getElementById('customfield_10163').selectedIndex].text == "None")
{
val10163=0;
}
else
{
val10163=parseInt(document.getElementById('customfield_10163').options[document.getElementById('customfield_10163').selectedIndex].text);
}
if(document.getElementById('customfield_10164').options[document.getElementById('customfield_10164').selectedIndex].text == "None")
{
val10164=0;
}
else
{
val10164=parseInt(document.getElementById('customfield_10164').options[document.getElementById('customfield_10164').selectedIndex].text);
}
if(document.getElementById('customfield_10165').options[document.getElementById('customfield_10165').selectedIndex].text == "None")
{
val10165=0;
}
else
{
val10165=parseInt(document.getElementById('customfield_10165').options[document.getElementById('customfield_10165').selectedIndex].text);
}
if(document.getElementById('customfield_10166').options[document.getElementById('customfield_10166').selectedIndex].text == "None")
{
val10166=0;
}
else
{
val10166=parseInt(document.getElementById('customfield_10166').options[document.getElementById('customfield_10166').selectedIndex].text);
}
if(document.getElementById('customfield_10162').options[document.getElementById('customfield_10162').selectedIndex].text == "None")
{
val10162=0;
}
else
{
val10162=parseFloat(document.getElementById('customfield_10162').options[document.getElementById('customfield_10162').selectedIndex].text);
}
finalvalue = ((val10163+val10164+val10165+val10166)/4)*val10162;
document.getElementById('customfield_14661').value=finalvalue.toFixed(1);
AFAIK it is available . you will need to check if you need to disable inline editing / it will automatically disable for these fields only .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can also use behaviours plugin for this ... See this similar example
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.