Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

can't change display of 'view issue screen' by writing javascript in field's 'Field Description'

fabby
Contributor
January 4, 2013

my jira version is 4.4.1

i want to change the display of 'view issue screen'.

1. for example,make the field "Description" 's text in 'red' color on 'view issue screen'.

so i put the following javascript code to the field "Description"'s Field Description

<script type="text/javascript">
document.getElementById("issue-description").style.color="red";
</script>

the field "Description"'s text is still in its black color on 'view issue screen'

2.while "Description" show red color when i do the similar action to this field on 'edit issue screen' or 'create issue screen'

<script type="text/javascript">
document.getElementById("description").style.color="red";
</script>

3. so can i say javascript in 'Field Description' only have effect to 'edit issue screen' or 'create issue screen'?

or is there another way to make it?

1 answer

1 accepted

0 votes
Answer accepted
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2013

Try this in the announment banner.

<script type='text/javascript'>
AJS.$(document).ready(function() {
        AJS.$("#description-val").css("color", "red");
   }
);
</script>

fabby
Contributor
January 4, 2013

hi, Renjith

i tried your code,it has no effect for 'view issue screen',but useful for 'edit issue screen' or 'create issue screen'

and [Try this in the announment banner.] where is the [announment banner]? i just paste the code to field description

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2013
fabby
Contributor
January 5, 2013

Renjith,

thanks very much !

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events