Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Announcement Banner

Hi,

I made this script, and all of the fields worked ok, instead one field only in Edit screen..

This field didn't work on Edit screen: #rowForcustomfield_14307

This is the only field that we didn't create new one, We took an old field and rename it.. 

This is the script:

<script type="text/javascript">
jQuery(document).ready(function($) {
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
callFunction();
});
callFunction();
function callFunction(){
if(document.getElementById("issuetype-field")!=null)
{
if((document.getElementById("issuetype-field").value == "Bug-Customer")||(document.getElementById("issuetype-field").value == "Bug-Internal")||
(document.getElementById("issuetype-field").value == "RFE")){


AJS.$('#customfield_10801').parent().children().first().attr("style","font-weight: bold;color:#191970")
AJS.$('#customfield_11507').parent().children().first().attr("style","font-weight: bold;color:#191970")
AJS.$('#customfield_14307').parent().children().first().attr("style","font-weight: bold;color:#191970")
AJS.$('#summary').parent().children().first().attr("style","font-weight: bold;color:#191970")
AJS.$('#priority').parent().children().first().attr("style","font-weight: bold;color:#191970")
AJS.$('#status').parent().children().first().attr("style","font-weight: bold;color:#191970")
}
}
else if(document.getElementById("issuedetails")!=null)
{
var TypeView= AJS.$("#issuedetails .item #type-val").text();
var TypeViewVal= TypeView.trim();
if (TypeViewVal=='Bug-Customer' || TypeViewVal=='Bug-Internal' || TypeViewVal=='RFE')
{

AJS.$('#rowForcustomfield_10801 strong').attr("style","font-weight: bold;color:#191970")
AJS.$('#rowForcustomfield_11507 strong').attr("style","font-weight: bold;color:#191970")
AJS.$('#rowForcustomfield_14307 strong').attr("style","font-weight: bold;color:#191970")
AJS.$('#issuedetails .item.item-right strong').first().attr("style","font-weight: bold;color:#191970")
AJS.$('#issuedetails .item.new strong').attr("style","font-weight: bold;color:#191970")
var Links= AJS.$('.links-list')
var title = document.getElementsByTagName("DT");
for(var i=0; i<Links.length; i++){
if(title[i].innerHTML == 'Salesforce Case'){
var div = document.getElementsByClassName("links-list");
var nodelist = div[i].getElementsByTagName("DD").length;
for(var j=0; j<nodelist; j++){
var ids = div[i].getElementsByTagName("dd")[j].id;
document.getElementById('delete-link_' + ids).style.visibility= 'hidden';

}
}
}
if(document.getElementById("edit-issue-dialog"))
{
AJS.$('#customfield_10801').parent().children().first().attr("style","font-weight: bold;color:#191970")
AJS.$('#customfield_11507').parent().children().first().attr("style","font-weight: bold;color:#191970")
AJS.$('#customfield_14307').parent().children().first().attr("style","font-weight: bold;color:#191970")
AJS.$('#summary').parent().children().first().attr("style","font-weight: bold;color:#191970")
AJS.$('#priority').parent().children().first().attr("style","font-weight: bold;color:#191970")
}
}
}

 

}
});
</script>

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

520 views 2 18
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you