Forums

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

Can't define define smart value variable with a custom field with spaces in the name

Tom Hudgins
Contributor
February 13, 2023

Hi,

I'm trying to define a smart value variable. I want to concatenate some text with the value of an issue field.

In the smart value action to define a vaiable I enter the variable name and in the "Smart Value" field I'm trying to enter the smart value reference to my custom field ("DS Safe") but I can't enter a space character in the field. Since I can't type a space character in the box, I can't reference my field. Yes, I know I can use customfield_xxxx to reference the field but I'd rather use the name.

image.png

The even stranger thing is I can "paste" a space in that box. So if I create the value outside this dialog "{{issue.DS Safe}}" I can paste it and it works. 

This seems like a bug. Anyone else seeing this?

3 answers

1 accepted

0 votes
Answer accepted
Tom Hudgins
Contributor
February 15, 2023

Atlassian confirmed this is a bug

https://jira.atlassian.com/browse/AUTO-344

Workaround is to copy/paste or enter the text without spaces and then go back and add the spaces. Turns out you can enter spaces between characters just not at the start or end of a line.

0 votes
Tony Langlet
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.
February 13, 2023

Hello Tom,

I think automations for Jira requires the customfield id and not the name, it's also a failsafe if you or some other Jira admins in your organization decides to create a different custom field with the same name (it happened to me). 

I've only used the way Joel mentioned with {{issue."name x"}} and the customfield.id when it comes to adding spaces.

You could always try the ASCII code for space and hope that the backend API is converting it to a space. I've worked with some of the Jira APIs and they're usually sensitive of the content-type encoding, unless they've used a dedicated encoding in the backend API calls.

Tom Hudgins
Contributor
February 13, 2023

Thanks, I get the risk of using a field name instead of the customfield id and it's bitten me before as well. I was going for readability in this case as the fields I'm using are not likely to change or be duplicated.

This actually goes beyond field names however. If I wanted a smart variable to have a value of "Hello World" I can't do it because I can't type a space in the box. 

0 votes
Joel Batac
Contributor
February 13, 2023

try 

{{issue."DS Safe"}}

Tom Hudgins
Contributor
February 13, 2023

Nope. I physically can't type a space character in either box in that dialog - whether it's quoted or not.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events