Xporter for JIRA - Hyperlink escape character

Hi,

Using JIRA 7.1.7 server + Xporter for JIRA 4.3.0.

Does anyone know if there's an escape character for hyperlinks referencing JQL?


I'm currently writing an Xporter document (output to Word) and am trying to output a hyperlink with the text/title as the JQL count value (working fine), and with the hyperlink taking me to the results of a search query.

For example, given the JQL status = "In Progress", I tried

@{title=${jqlcount:status = "In Progress"|href=${BaseURL}/issues/?jql=status = "In Progress"}

That failed (the output URL was https://jiraserver/issues/?jql=status = ), so I tried:

@{title=${jqlcount:status = "In Progress"|href=${BaseURL}/issues/?jql=status%20%3D%20"In Progress"}

^^ Replace spaces with %20 and = with %3D (resulting in same output, everything after the space after = is truncated)

AND

@{title=${jqlcount:status = "In Progress"|href=${BaseURL}/issues/?jql=status%20%3D%20\"In Progress\"}

This output everything in the URL, but my query still didn't work.

image2016-10-20 13:13:39.png

Does anyone have any suggestions? Should I be trying single/double quotation marks, and escaping/not escaping those?

I've been very careful to make sure that MS Word is using straight quotes and not the stylised ones (as far as I can tell).

Thanks,
Jimmy


PS Would be awesome if there was a feature that allowed templates to do something like this:

${jqlcountlink:status = Open and created > -14d}

Something like that, where the JQL count is returned, and it automatically converts into a hyperlink taking a user to ${BaseURL}/issues/?jql=query

I can only see a few scenarios where that would be annoying, and where it might break a few things for people using ${jqlcount:query}, so suggesting an entirely new function.

1 answer

1 accepted

2 votes
Accepted answer

Hi @Jimmy Van,

You have 2 problems here:

@{title=${jqlcount:status = "In Progress"|href=${BaseURL}/issues/?jql=status = "In Progress"}

A } before |, this is to close the jqlcount function: ${jqlcount:<jql>}.

The other problem is on href definition, you should encode the "In Progress" due to quotes(").

Here is what you need:

@{title=${jqlcount:status = "In Progress"}|href=${BaseURL}/issues/?jql=status = %22In%20Progress%22}

 

I hope this helps you.

 

Cheers,

Rui Rodrigues.

Great, thanks Rui. Worked like a charm.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 9 hours ago in Statuspage

How do your teams prepare for really high (planned) traffic days like Cyber Monday?

Hi there! Shannon from Statuspage here.  👋  With Cyber Monday quickly approaching, we're looking to hear from Atlassian customers – specifically from teams who touch incident response li...

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