Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add a url with blank in the smart value trigger by automation?

Daniel Cattarius September 15, 2019

Hello,

I want to print a dynamic url with blank in a task.

Example:
In the plugin is the following syntax to fill the field description:
http://test.de/docs/{{version.name}}/test.pdf

After creating the task, the following text appears in the description field:
http://test.de/docs/Test 19.0/test.pdf

The problem is now the blank in the url. This breaks the url.

Is there a solution?

Regards

Daniel

3 answers

1 accepted

0 votes
Answer accepted
Daniel Cattarius September 16, 2019
Iago Docando
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2019

Glad to see you found a convenient solution.

1 vote
Nick Menere
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2019

Hi Daniel,

Strings have a method to URL encode them. The following should work:

http://test.de/docs/{{version.name.urlEncode}}/test.pdf

More info on encoding can be found at - https://docs.automationforjira.com/reference/text.html#encoding

 

Hope that helps.

Cheers,
Nick [Automation for Jira]
Co-founder

Daniel Cattarius September 16, 2019

Before I wrote here I had already tried that and that did not work.

The urlEncode turns a blank character into a + sign.

Like Jonathan Holford likes this
Nick Menere
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2019

Apologies but you are correct. When the space is part of the path it should be encoded into "%20" but when it is part of the query it should be "+". sigh...

Like Jonathan Holford likes this
0 votes
Iago Docando
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2019

blank spaces in URLs must be introduced as %20.

If nothing else comes up you could simply use Test_19.0 as a workaround. 

Daniel Cattarius September 15, 2019

I know. But how can I manipulate {{version.name}}?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events