In a plugin that implements a new Action, I would like to redirect to the original search filter upon completion

I created a plugin that implements a new action ("create subtasks for versions"). This action creates a number of subtasks for a selected group of versions. Typically a user would use this action from a bug when in a search filter (e.g., "unscheduled")

When the action is complete, I know how to redirect to the bug, but I cannot figure out how to redirect back to the original search filter URL. Is this possible?

2 answers

1 accepted

Got it:

@Override

protected String doPostCreationTasks() throws Exception {
        String rtn = "/browse/" + getOrigIssueKey();
        SearchRequest searchRequest = getSearchRequest();
        if (searchRequest != null) {
            rtn += "?filter=" + searchRequest.getId();
        }
        return returnComplete(rtn);
    }

IssueActionSupport.getSearchRequest is what I needed.

0 vote
Timothy Chin Community Champion Apr 13, 2014

Is this possible?

I know that it is possible. I just cannot remember how to get it out of the session. Take a look at the com.atlassian.jira.web.action.issue.IssueNavigator class.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

131 views 0 4
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