Using webwork1 with CreateIssueDetails Edited

Hello. I want to add some functions on issue creating.

I have this webwork in my atlassian-plugin.xml:

<webwork1 key="unitera-create-issue-details" name="Unitera Create Issue Details"
<action name="org.smedyou.tutorial.ComDescCreateIssueDetails"
<view name="error">/secure/views/createissue-details.jsp</view>

And this class, which extends CreateIssueDetails.class, as seen


package org.smedyou.tutorial;

import com.atlassian.jira.bc.issue.IssueService;
import com.atlassian.jira.bc.issue.comment.CommentService;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.event.mau.MauEventService;
import com.atlassian.jira.issue.IssueFactory;
import com.atlassian.jira.issue.IssueInputParameters;
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.TemporaryAttachmentsMonitorLocator;
import com.atlassian.jira.issue.comments.Comment;
import com.atlassian.jira.user.ApplicationUser;
import com.atlassian.jira.util.JiraUrlCodec;
import com.atlassian.jira.web.action.issue.CreateIssueDetails;
import com.atlassian.jira.web.action.issue.IssueCreationHelperBean;

public class ComDescCreateIssueDetails extends CreateIssueDetails {

    private IssueService issueService;
    private CommentService commentService;

    public ComDescCreateIssueDetails(IssueFactory issueFactory, IssueCreationHelperBean issueCreationHelperBean, IssueService issueService, TemporaryAttachmentsMonitorLocator temporaryAttachmentsMonitorLocator) {
        super(issueFactory, issueCreationHelperBean, issueService, temporaryAttachmentsMonitorLocator);
        this.issueService = issueService;

    protected String doExecute() throws Exception {
        String var1;
        try {
            if(this.hasAnyErrors()) {
                var1 = "error";
                return var1;

            var1 = this.doPostCreationTasks();
        } catch (Exception var6) {
            this.log.error(var6, var6);
            this.addErrorMessage(var6.getMessage() != null?var6.getMessage(): ExceptionUtils.getFullStackTrace(var6));
            String var2 = "error";
            return var2;
        } finally {

        return var1;

    protected String doPostCreationTasks() throws Exception{
        commentService = ComponentAccessor.getComponent(CommentService.class);
        Comment comment1 = addComment("First coment!");

        //from CreateIssueDetails.class
        String issueKey = JiraUrlCodec.encode(this.getKey());
        if(this.isIssueValid()) {
            return this.getRedirect("/browse/" + issueKey);
        } else {
            return this.getRedirect("CantBrowseCreatedIssue.jspa?issueKey=" + issueKey);

    private Comment addComment(String commentString, MutableIssue issue, ApplicationUser user) {
        CommentService.CommentParameters commentParams = new CommentService.CommentParameters.CommentParametersBuilder()
        CommentService.CommentCreateValidationResult commentResult = this.commentService.validateCommentCreate(user, commentParams);
        return this.commentService.create(user, commentResult, true);

So, I tried to change this code, using java.lang.Object instead of 


in webwork and so on. But after filling the fields at http:/[jira]/secure/CreateIssue.jspa?pid=10000&issuetype=10000 and pressing Create, I am redirected to http:/[jira]/secure/CreateIssueDetails.jspa getting a code 404. I do not understand why it doesn't go to http:/[jira]/secure/browse/<issue_name>, but to http:/[jira]/secure/<alias>.jspa. Thanks for responses.


1 answer


I think the probem is in your XM plugin definition of your action


Try to see this link maybe it can give you some help

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

875 views 3 9
Read article

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