How to refresh/reload a page using script runner

Pradeep A
Contributor
August 4, 2021

Hi I would like to refresh/reload the page when I run a piece of code How can I do it

 

2 answers

0 votes
James Hunt (Ascend)
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!
December 1, 2021

Depending on where your code is being executed you can do a call to 

 Response.temporaryRedirect(URI.create("${baseUrl}/browse/${issue.key}")).build()

 We use it within custom REST endpoints with Scriptrunner for Jira.

0 votes
Nic Brough -Adaptavist-
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.
August 4, 2021

I don't believe you can do this.  You'd need to inject your own javascript to do it, and SR doesn't have a way to do that.

Could you explain what you're actually trying to achieve and why a page refresh is desired?

Pradeep A
Contributor
August 4, 2021

When I try to display the message using  UserMessageUtil.success('Good job! ') It doesn't display until the page is refreshed Any solution for this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events