Create
cancel
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

How do I display a "success" pop up message as a result of a Webwork Action?

Good morning,

I'm developing a small Jira plugin and I have created a simple Webwork Action (extending JiraWebActionSupport) that takes some data from an input form, makes some business logic and returns a result (success or failure).

 

Instead of returning a new page (like success.vm, for instance), I would like to just show a pop up message (like these) with a custom text.

 

I've tried to use the JiraWebActionSupport's methods addMessageToResponse and returnMsgToUser, but the resulting page shows no messages.

 

Am I doing something wrong? Should I maybe add some Javascript or HTML to the resulting page template to show the message?

1 answer

In your plugin javascript, giddy up on this:

JIRA.Messages.showSuccessMsg('Returned Success',{closeable: true, timeout: 10});

more verbose:

function updateConfig() {
$.ajax({
url: url,
type: "PUT",
contentType: "application/json",
data: JSON.stringify({ key: $("#key").val() }),
processData: false
}).success(function(data, textStatus, jqXHR) {
JIRA.Messages.showSuccessMsg('Returned Success',{closeable: true, timeout: 10});
});

 

It will display the Jira message at the top of the page - like you've seen before - and then remove the message after 10 seconds.

Suggest an answer

Log in or Sign up to answer
TAGS

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