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

Custom field tooltip

Sanu Soman Dec 17, 2013

Hi All,

I'm trying to add some help text for a custom field in create screen, which is mentioned in the link,

https://confluence.atlassian.com/display/JIRA/Creating+Help+for+a+Custom+Field

I used below script and added to description of the "Application Name" custom field, but not getting anything in create screen.

<script type="text/javascript">
function showHelp() {
var helpDiv = AJS.$("Application Name");
if (helpDiv.length == 1) {
helpDiv = helpDiv[0];
if (helpDiv.style.display == 'none')

{ helpDiv.style.display = ''; }

else

{ helpDiv.style.display='none'; }

}
}
</script>

<a href="#" title="Application Name" onclick="showHelp(); return false;"><img src="/images/icons/ico_help.png"/></a>
<div id="Application Name" style="display:none">
Application Name - help text
</div>

Could you please suggest a solution.

thanks,

Sanu P Soman

1 answer

0 votes
Rambanam Prasad Dec 17, 2013

try by adding javascript inside of this bind event

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
//add your code here
});

check this

https://answers.atlassian.com/questions/47843/strange-javascript-problem-in-create-screen

Sanu Soman Dec 17, 2013

Tried,

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
<script type="text/javascript">
function showHelp() {
var helpDiv = AJS.$("Application Name");
if (helpDiv.length == 1) {
helpDiv = helpDiv[0];
if (helpDiv.style.display == 'none') {
helpDiv.style.display = '';
} else {
helpDiv.style.display='none';
}
}
}
</script>
<a href="#" title="Application Name" onclick="showHelp(); return false;"><img src="/images/icons/ico_help.png"/></a>
<div id="Application Name" style="display:none">
Application Name - help text
</div>
});

But getting,

Rambanam Prasad Dec 17, 2013

try like this

&lt;script type="text/javascript"&gt;
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
function showHelp() {
	var helpDiv = AJS.$("Application Name");
	if (helpDiv.length == 1) {
		helpDiv = helpDiv[0];
		if (helpDiv.style.display == 'none') {
			helpDiv.style.display = '';
		} else {
			helpDiv.style.display='none';
		}
	}
}
});
&lt;/script&gt;
&lt;a href="#" title="Application Name" onclick="showHelp(); return false;"&gt;&lt;img src="/images/icons/ico_help.png"/&gt;&lt;/a&gt;
&lt;div id="Application Name" style="display:none"&gt;
Application Name - help text
&lt;/div&gt;

Sanu Soman Dec 17, 2013

Now nothing showing in description, the problem is something else?

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira

Try Jira Cloud for Outlook: Organize your work without leaving your inbox

Hi Atlassian community, My name is Max and I work on the product integration team at Atlassian. I am pleased to announce the early access program for the Jira Cloud add-in for Outlook. This add-in...

1,255 views 2 13
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