Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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.



Log in or Sign up to comment
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

141 views 1 12
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