I wan to map the value from one custom field to another custom field
my manager would like the value os our "level of effort" field of type radio button mapped into "story points" of type number field.
the reason for this is so the engineers can select the level of effort from a list rather than putting a number in, this will be used for the Agile estimating and must be a number field from what I see.
I am trying to use java script in the "level of effort" description box but it is not working and I think it is because I do not have the proper names of the database structures, I am not sure number filed has selectedIndex
I also want to hide the "Story Points" field so it cannot be changed.
below is the java script I am using ("level of effort" id is 11053, "Story Points" id is 10002
<script type="text/javascript" charset="utf-8" id="storyPointsCustomFieldScript">
function setIssueStoryPoints(e) { // set the value of the story point field here:
if(document.getElementById("customfield_11053_1").checked) { document.setElementById("customfield_10002").numberValue = 1; } else
if(document.getElementById("customfield_11053_2").checked) { document.getElementById("customfield_11051").selectedIndex = 2; } else
if(document.getElementById("customfield_11053_3").checked) { document.getElementById("customfield_11051").selectedIndex = 3; } else
if(document.getElementById("customfield_11053_4").checked) { document.getElementById("customfield_11051").selectedIndex = 4; } else
if(document.getElementById("customfield_11053_5").checked) { document.getElementById("customfield_11051").selectedIndex = 5; } }
function hideStoryPointsHook() {
var row = document.getElementById("storyPointsFieldArea");
row.style.display = 'none';
AJS.$("#customfield_11053_1").parents('form').submit(setIssueStoryPoints); }
var currentLocation = window.location.href; if (currentLocation.indexOf('CreateIssue') > -1 || currentLocation.indexOf('EditIssue') > -1) {
AJS.$(document).ready(hideStoryPointsHook); }
</script>