You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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>