Forums

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

Add help text for multiple custom fields

Jira Support Team _ Smals March 24, 2020

Hi all,

We have an issue when we add an help button beside several custom fields in a same screen.
If we add help beside only one custom field, there is no problem but if we add help beside more than one custom field, it's always the same text that is displayed.

Here is an example :
We have two custom fields with help (Risk probability & Risk Impact Level). If we click on the help button, it is always the description of the first custom field (in this case, Risk probability) that is displayed.
 image.png

The script used in the Risk Impact Level's description is the following :

Impact of the risk (1=very low, 5 is critical).
<script type="text/javascript">
function showHelp() {
var listenersDiv = document.getElementById("qaFieldHelp");
if (listenersDiv.style.display == 'none') {
listenersDiv.style.display = '';
} else {
listenersDiv.style.display='none';
}
}
</script>
<a href="#" onclick="showHelp(); return false;"><img src="/images/icons/help_blue.gif"/></a>
<div id="qaFieldHelp" style="display:none">
An explanation of the possible values.<br />
1: very low<br />
2: low<br />
3: medium<br />
4: high<br />
5: critical <br />
More details on these values can be found <a href="/secure/custom/impactScale.xls">here</a>.
</div>

 Thus, you can see that it's not the same than the message displayed above.

We have defined the Javascript script in the description of the custom field and also in the description of the field in the Field configuration.

Do you have any idea to help us ? We absolutely need the help for several custom fields.

Kind regards

1 answer

1 accepted

0 votes
Answer accepted
Ronak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2020

Hello,

Use different function names and IDs.

In this case, the following should work

Impact of the risk (1=very low, 5 is critical).
<script type="text/javascript">
function showHelpRL() {
var listenersDiv = document.getElementById("rlFieldHelp");
if (listenersDiv.style.display == 'none') {
listenersDiv.style.display = '';
} else {
listenersDiv.style.display='none';
}
}
</script>
<a href="#" onclick="showHelpRL(); return false;"><img src="/images/icons/help_blue.gif"/></a>
<div id="rlFieldHelp" style="display:none">
An explanation of the possible values.<br />
1: very low<br />
2: low<br />
3: medium<br />
4: high<br />
5: critical <br />
More details on these values can be found <a href="/secure/custom/impactScale.xls">here</a>.
</div>

 

Cheers,

RO 

Laura S May 19, 2020

I have the above show/hide working on a field description under field configuration. I can't get the relative href to work. I created the custom folder under /secure and put MyTextDoc.txt in it. <a href="/secure/custom/MyTextDoc.txt">HELP</a> . When I select the link, the browser launches with URL: localhost:8080/secure/custom/MyTextDoc.txt but the screen is blank. (I'm using localhost on a Jira dev instance). I checked the folder security and verified users have Read access. Any ideas?

Thx

Suggest an answer

Log in or Sign up to answer