Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


how to execute a URL in url customfield in behavior script and show response in another customfield?

I have a URL custom field and a text custom field. if someone pastes a URL in the URL custom field it should execute that URL and show the JSON response of that URL in another custom it possible through Behavior scripts? please help me out how to execute a GET request behind the scenes and shows the response in another custom field??

1 comment


Log in or Sign up to comment
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 20, 2019

If you add a server-side script to your URL field, you can execute the get and store the result in another form field like this:


def url = getFieldById(getFieldChanged()).value
def targetField = getFieldByName("Url fetch result field name")
def responseText
def httpBuilder = new HTTPBuilder(url)
httpBuilder.request(Method.GET, ContentType.JSON) {
response.success = {resp, json->
response.failure = {resp, data ->
targetField.setFormValue("Unable to fetch data from $url. The status was $resp.statusLine. The HTTP GET returned the following text: ${data.toString()}")

Note that this will execute after you focus changes from the URL field.

Also, it will fail if the URL is bad or doesn't return a valid json (this method automatically parses the json into an object). So you may want to wrap the httpBuilder request into a try/catch block.

AUG Leaders

Atlassian Community Events