Jira v6.0.2 doesn't run the java script from a custom filed description during create ticket process

In my project, we have 2 custom fileds (A&B) where "B" should always match to the group name from A followed by some additional name tag (Ex: A=ROY_RO. "B" Should be ROY_Approver). So, i've the below java script written to compare the group name "ROY" between "A & B" and do an additional check on "_App" from custom field "B" and let user submit the ticket only if it mathces...

I've placed this script in the descriptiong filed of custom filed "B". But, while creating ticket, this script was never called and ticket gets create when "B" has a different Gourpname.

Has anyone tried this earlier?

<script type="text/javascript">

AJS.$(document).bind('dialogContentReady', function(event, dialog) {

var submit_btn = document.getElementById("create-issue-submit");

//adding event listner for the submit button

submit_btn.addEventListener("click", function(e){

//get the groupName

groupName = document.getElementById("customfield_13401").value.split("_")[0];

// create the compare string

group_Ind = groupName + "_App";

console.log('the group ind is :' + group_Ind)

// get the approver

approverEl = document.getElementById("customfield_13410");

approver = approverEl.value

// compare the group_Ind with the approver to check for the match


if (approver.substring(0,group_Ind.length) != group_Ind){


document.getElementById("customfield_13410").value = "Incorrect Value"





1 answer

Atlassian Group,

Can anyone help me with the information why Javascript is not been pickedup during ticket creation, Please?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,770 views 18 21
Read article

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