How to define a URL link in Behaviour script

Sharadkumar November 4, 2022

Hello,

I want to define a hyperlink in the behaviour script, So when creating a Jira ticket , they will see the link And click that url.

Condition is that Hyper link "google"to be visible at the bottom  not at the top.

This is my script but when i click on it while creating a ticket , it dont work..It works in view mode.

Can u plz help

 

My script 

 

def hyper="[google|http://google.com]";
def desc = getFieldById("description")
def defaultValue = """ """+ hyper+""";
*Change Description*

*Impact Assessment*


*Rollback Plan*

if (!desc.formValue) {
    desc.setFormValue(defaultValue)
   
}

1 answer

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 4, 2022

Hi @Sharadkumar 

Try this by placing it as a behaviour to the field you want:

def formField = getFieldById(getFieldChanged())
formField.setHelpText("Please visit this " + "<a href=\"https://google.com\">link</a>")

url link.png

Sharadkumar November 4, 2022

Thank you very much Alex.

Its working fine now :)

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 17, 2022

@Sharadkumar kindly mark my answer as accepted in order to help others with the same question. Thanx!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events