Forums

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

How to generate a link with scriptrunner

lightam
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!
November 13, 2019

Hello together, 

i want the following:

- The user creates an issue

- When he fill the custom Field TicketID with the value "AB1234"

- I want that after the user switch to another field the value of field TicketID switch to
"www.myticketsystem.com/AB1234"

How is this possible with scriptrunner? 
Do I need a listener or a custom script field?

1 answer

0 votes
Mike Rathwell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2019

Hi @lightam 

Is there any particular reason you need it to change as the issue is being created? This would be quite straightforward to do in a Create Post Function where:

  • Groovy Post Function script reads the current value in the field
  • Prepends it with "baseUrl/browse/"
  • Writes it back.

Note: I use the "baseUrl" always rather than hard coding the URL of the site; that way if it changes OR I move over to my test instance, it picks up what the system thinks it is and not what I told it when it was that.. thing.

Hope this helps

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events