Make a redirection to a specific URL (JAVA code)

Hi,

I'm writing a specific workflow plugin that creates a specific clone of an issue.

At the end of treatment I would like to be redirected to the new issue. I provided all the elements to build the url: Issue Key and base URl.

My class extends the AbstractJiraFunctionProvider class.

Could you provide me a solution please ?

Thanks in advance

2 answers

1 accepted

0 vote

I'm not sure that this is possible inside a workflow function - the landing point at the end of a workflow is determined by code around the outside and I don't think you can simply subvert it in a post-function. I think the landing point decision is made in the urls and .jsps that handle issue actions, so you'll need to dive into coding in those in the core of Jira, not as a plugin.

You could try something with javascript - on issue view, have some javascript that says "I'm on the original issue, but they've just come from transition X, which created a new issue, so I need to redirect to that", but instinctively, that feels ugly and you'd have to work out a way of not doing the redirect on all other views.

On a human side, I'd also point out that this is probably not a good idea. If a human does something to an issue, it's a jolt to suddenly be presented with a completely different issue without any warning.

Thanks for your reply,

Another solution would be to produce a pop-up. Is it possible to produce a pop-up (pop-up displayed when creating an exit for example) in java?

Thanks Again

I'm not entirely sure - the code for the messages Atlassian generate is in the surrounding structure, but I don't know if they are feeding the message out of the java.

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 2 hours ago in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

13 views 0 3
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