How do I properly integrate the default CreateIssue Dialog into my plugin?

I was wondering whether it is possible to integrate the CreateIssue dialog into a plugin and after triggering the create event make the plugin execute some more java-code from the webwork plugin.

Right now the situation is as follows: The plugin calls for the CreateIssue dialog to be opened at some point but after creating the Issue it exits the code.

I know that I can redirect back into my code when I write my own template. But when I use the default jira dialog I can't just do that.

Is there any way to go back into my code?

the method currently used is:

ServletActionContext.getResponse().sendRedirect(url);

Thanks in advance

2 answers

1 accepted

This widget could not be displayed.

it looks like you have to write an EventListener that listens to the issue creation and does the customization afterwards

Jesus.

I was afraid that would happen ^^
Alright thanks. Gonna try my best.

This widget could not be displayed.

Hi,

the url to create issue req.getContextPath()+"secure/CreateIssue.jspa"

and you can add parameters : issue type, project..

For example

resp.sendRedirect(req.getContextPath()+"/secure/CreateIssue.jspa?issuetype=issuetypeid")

yes, I know. and the plugin already does that.

It's just that after clicking "create" I want to run more java-code instead of just doing what the dialog does on default

well I guess I've not been formulating this right.

It's not really that I want to change what CreateIssue does. I want CreateIssue to execute just as it usually does, but after it has finished executing I kinda want to redirect to my own code again.

If I wrote the code for the dialog myself I would just add a post function to the template. But I can't really do that because I would have to know the whole jira structure, which is way too complex...

if you want to do more than the "deafult" provides haven't you just to write your own class that extends from com.atlassian.jira.web.action.issue.CreateIssue and add your customization there?

public class MyCreateIssue extends CreateIssue {

    public MyCreateIssue(IssueFactory issueFactory, IssueCreationHelperBean issueCreationHelperBean) {
        super(issueFactory, issueCreationHelperBean);
    }
    
    // ...
}

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

141 views 16 7
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you