Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,297,340
Community Members
 
Community Events
165
Community Groups

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 Service Management

Coming Soon: Insight Changing to Assets

The 2020 acquisition of Mindville added powerful asset and configuration management capabilities to Jira Service Management in the form of Insight. Following the completion of that integration, custo...

50 views 0 1
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