Kepler Redirect function does not work with issue key

Hi All,

I want to use the Redirect function from KATL-COMMONS to redirect the user to a specific site in JIRA.

How I want to do this:

- I call the site /secure/KRedi.jspa?CFID=TPAPT-16 with the parameter cfid = issue key (f.e. TPAPT-16)

- The script then shall return an url /browse/issueId (f.e. /browse/TPAPT-16)

However, the problem is, that the script does not recognize the Issue key. Doesn't matter which issue key I use, it shows me the same error message all the time:

The project or issue you are trying to view does not exist.

Even though it does exist. So I guess that the dash in the issue key is a problem, and that the script only catches the part before it, like TPAPT. I have tried it with ', ", ( and [ but it never works.

Does anyone know how to tell the Redirect script that the parameter I am feeding it with also includes the dash (-) and the part behind that?

Here is the little redirect script:

string IssueId = argv["CFID"];
if (isNull(IssueId))
{
string url = "/secure/KRedi!error.jspa?customErrorTitle=Enrich+Error&customErrorMessage=The+Enrich+field+of+the+Issue+was+empty";
return url;
}

string url ="/browse/IssueId";
return url;

Here is the link to the Kepler Redirect function: http://confluence.kepler-rominfo.com/display/SIL/KRedi+-+The+Redirect+Assistant

Thanks in advance,

Florian

2 answers

1 accepted

Hi Florian,

The script will always redirect you to /browse/IssueId and since "IssueId" is not an issue key, will tell you that it doesn't exist.

Line 8 should be: string url ="/browse/" + IssueId;

HTH

Thank you Florin, it works! :)

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 May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

828 views 2 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