Custom field with script

Hi!

I have a custom field with this script

 

<script type="text/javascript">
impact = document.getElementById('customfield_10101');
emergency = document.getElementById('customfield_10123');
priority = document.getElementById('customfield_11603');
priority.disabled= 'true';
impact.onchange=function()
{ priority_choose(); }

emergency.onchange=function() { priority_choose(); }
function priority_choose(){
if (impact.value == 10108 && emergency.value == 10572)
{ priority.value = 14642; //HIGH and HIGH = CRITICAL }
else if (impact.value == 10108 && emergency.value == 13205)
{ priority.va lue = 14643; //HIGH and MEDIUM = HIGH }
else if (impact.value == 10108 && emergency.value == 10573)
{ priority.value = 14645; //HIGH and LOW = MEDIUM }
else if (impact.value == 10109 && emergency.value == 10572)
{ priority.value = 14643; //MEDIUM and HIGH = HIGH }
else if (impact.value == 10109 && emergency.value == 13205)
{ priority.value = 14645; //MEDIUM and MEDIUM = MEDIUM }
else if (impact.value == 10109 && emergency.value == 10573)
{ priority.value = 14644; //MEDIUM and LOW = LOW }
else if (impact.value == 10110 && emergency.value == 10572)
{ priority.value = 14645; //LOW and HIGH = MEDIUM }
else if (impact.value == 10110 && emergency.value == 13205)
{ priority.value = 14644; //LOW and MEDIUM = LOW }
else if (impact.value == 10110 && emergency.value == 10573)
{ priority.value = 14646; //LOW and LOW = PLANNED }
else
{ priority.value = -1; //NONE; }
}
</script>

 

 

it is  working in project A but when I used this custom field in project B, this operations does not work. My custom field is global, and I use this field with the others 2 to do a combination

1 answer

Valeria,

At first glance I would ask if you could check if all 3 custom fields are actually available in the appropriate screens of project B.

Hi Mark, Yes! the 3 fields are in screens create,edit and view in project B.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,085 views 13 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot