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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,457,003
Community Members
 
Community Events
176
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

Atlassian Community Events