We want to set helptext for "Description" field via behavior

Our JIRA had installed the "Script Runner" plugin.

1, We want to set helptext for "Description" field by behavior if we , the original code as below:

def hepText=""
if
(secondCategory.contains("aaaaaaaaaaaaa")){

descValue = "Request Template"
helpText= "<a href='abbbb.html'> Request Template</a>"


}

else if(secondCategory.contains("XXXXXXX")){

descValue = " internal Request)"
helpText="<a href='abcd.html'> internal Request Template</a>"
}

}
description.setFormValue(descValue)
description.setHelpText(helpText)

2, According above code, if we select correct options for "Category" field, the helptext will have different value.

But, if the value of "Category"meets the first condition, the helptext works normally.

And, if we change the option(meet another condition) of "Category" field,  the value of the helptext had been set successfully(we see it in our logs), but we can't see it show on screen.

If anyone can give us some solution, thanks in advance.

 

1 answer

Hi Bin, 

Can I ask you what kind of custom field is the Category ? 

Hi Thanos,

Thanks for your response.

The "Category" is a select list (cascading) field, we want to set helptext for "Description" according to the value of "Category".

 

According the code we have provided, when we create the issue, if the first condition is satisfied, the description should have the helptext(it's normal ), now if we switch to second condition, the helptext of "Description" would not be appear.

It's so strange, so we want to know, is it a bug of the "Script Runner" plugin?

 

BTW, above code are been written in "initialize function" section of the behavior.

 

If there is need more information, please let  me know.

Thanks

Bin

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

708 views 6 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you