Forums

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

Escaping spaces when setting issue fields using automation

Andrew Berry
Contributor
May 19, 2020

I've created a custom labels field called "Issue context". What I'd like to do is combine several fields into that context field when an issue is edited, including:

1. Two single-valued custom fields

2. The issue components

3. Any labels

I have a basic automations set up, but it's creating entries with spaces as if they are multiple labels.

When I use smart values such as:

{{issue.customfield_10117.value}}

I'll get one label set per word.

Escaping it with:

{{issue.customfield_10117.value.asJsonString}}

Still gives me one label set per word, but with quotes :

Screen Shot 2020-05-19 at 8.13.00 AM.pngAny ideas?

1 answer

0 votes
John Funk
Community Champion
May 24, 2020

Hi Andrew,

I don't think I have answers for you for getting rid of the quote marks, but I am curious what you are actually trying to accomplish. Maybe there is another route to go. 

Andrew Berry
Contributor
May 25, 2020

We're taking several common labels and turning them into dedicated fields or components. However, we've now hit more fields than are allowed to be rendered on the kanban board, so I was hoping to join them all into a single field for display there.

John Funk
Community Champion
May 25, 2020

Take a look at this article and see if the combining of fields section helps:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/

Andrew Berry
Contributor
May 25, 2020

It looks like either the docs or the app have a bug. Pasting in the example call to join the fixVersions field isn't accepted.

{{issue.fixVersions.name.join(" - ")}}

Screen Shot 2020-05-25 at 11.23.22 AM.pngTyping it in by hand doesn't work either, because as soon as I press the space bar it closes the smart value. 

John Funk
Community Champion
May 25, 2020

You should probably go ahead and submit a Support Request to Atlassian then. If you don't mind, post back here what the solution was so we can close it out. :-)

Like Andrew Berry likes this
Andrew Berry
Contributor
May 26, 2020

Support reminded me that labels can never have spaces in them, which is why this wasn't working. Switching to a plain text field fixes this. Thanks for the suggestions!

John Funk
Community Champion
May 27, 2020

Great - glad you were able to get to a solution. :-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events