How to refresh the page/url in Jira automatically from a script

Hello,

Is there any way at the end of a script to automatically refresh the page/url in Jira automatically from a script?

I have tried :
JIRA.trigger(JIRA.Events.REFRESH_ISSUE_PAGE, [issueId]);
but it doesn’t work.

Thank you very much
Michael Sordo

Do you mean a hard refresh like window.location.reload() or reloading the content which is being displayed?
Your code looks correct for the second case, do you get anything in the browser console maybe?

Thanks for the response. Any of the options could work. Although in the second case I don’t recognize the groovy syntax, do I have something wrong?

Wait a second: are you talking about Groovy scripts or Javascript?
window.location.reload() will definitely work in JS and trigger a browser reload, with Groovy/Java I’m afraid you can’t really do that: once your page is loaded there’s no way to interact with the browser – the only option you have is emitting an event for which you have a Javascript listener.

Yes, is Groovy. I thought there was some way to import JS libraries and be able to use them in Groovy

Thank you very much
Michael Sordo