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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Web Item : How display a flag and redirect

It's possible to display a user message from a Web Item using flag return as described in ScriptRunner documentation :

It's also possible to redirect to a page with the code : 


But I would like to do the two things in the same return. Does anyone know if it's possible and how do that ?



1 answer

Hey, @Couleur_Connection .

There's nothing "out of the box" that will do this in ScriptRunner for Confluence, the way redirects and dialogs are built-in. There are ways that you might wire this up, though.

One option would be to have your REST Endpoint return the redirect, and set a property in the user's session (see javax.servlet.http.HttpSession). You could then make a separate REST Endpoint that read the list of messages from a session property and returned the information needed for the message (clearing the list of messages from the session so they didn't show up more than once). Then, you could wire up some custom javascript using a Web Resource which would call that second endpoint and render the messages to the user.

I should also note, we have a feature request on our backlog to make things like this easier. See . That would do most of the heavy lifting I described above for you, so please do vote for that feature if you're still interested!

@Jonny Carter I have created a web Item, but when I click it the flag is not displayed but the page redirecting to new page. Any solutions to this please?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

619 views 7 23
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you