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?
Community moderators have prevented the ability to post new answers.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.