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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.