Forums

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

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)
   
}

2 answers

0 votes
Margo Verameyenka June 5, 2024

Hello!
Is there any way to add this but at the top of the field instead of the bottom?

0 votes
Alex Koxaras _Relational_
Community Champion
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 Champion
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