Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,301,541
Community Members
 
Community Events
165
Community Groups

Different behavior of API for fields of type label among custom and standard fields

I am facing a weird problem with fields of type label while creating issues like Bug, Epic, Story, etc . 

While creating an issue, When we provide value for standard field labels which contains space, JIRA API handled the case and give proper error like:

{"labels":"The label 'Test lebels' contains spaces which is invalid."}

But when we pass the value in the label type of custom field which contains space like

'Test label', It gives no error and creates two separated labels like `Test`, `Label` .

 

Any comments or suggestions would be highly appreciated. 

1 comment

Daniel Ebers Community Leader May 12, 2020

Hi Himanshu,

welcome to the Atlassian Community!

It is correct that labels cannot contain a blank space. The blank space for labels works like a separator from UI. Workaround could be a underscore - but this depends on if you like this solutions. Some users don't.

This as being said applies to UI. The REST API might handle it differently. My advise in this case would be not to let labels contain blank spaces. It just won't work or produce not the results someone expects. Maybe you can find interest in the separation of labels.
Alternatively for some use cases the usage of a custom field could make sense.

Cheers,
Daniel

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

247 views 2 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you