How to refresh/reload a page using script runner

Pradeep A 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) 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-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 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