We have written a Javascript program that when an option is selected from Team Assignment Single List field then a group will be automatically selected from Team Assignment group. But it failed after we added new option in Team Assignment Single List field.
You can see the below code
<script type="text/javascript">
team = document.getElementById('customfield_14100');
if (team) {
target = document.getElementById('customfield_14101');
team.onchange=function() {
if (this.value == 13300) {
target.value = "XXX-XXX-XXX";
}
else if (this.value == 14204) {
target.value = "XXX-TSO-SAS"
}
else {
target.value = "Unmapped value: " + this.value;
}
}
}
</script>
Above program is working well for other option like 13300 and returning mentioned group (target value) .For the option id 14204 it is going to else loop and returning its target value Unmapped value: 14204 .even option id is correct and group name is also correct.