Label-like field in an add-on

I'd like to use a field type that the default Label functionality uses in JIRA. It's a type-to-search, multiple selection/tag field. However, I haven't succeeded in find it in any Atlassian documentation.

Actually, it's just like the tags field under my question.

Can someone please point me to it?

2 answers

0 votes

I'm not aware of any add-on that duplicates the labels functionality.

I think that's because you can simply add a new field of type "label", with another name.  So you don't need an add-on.

Hi Nic. I'm not trying to duplicate the labels functionality, merely to utilise the field type. The problem is, in AUI Documentation I cannot find a field of type "label". The Labels element is just that - a label - but it's not in an editable field, which is what I'm looking for.

Ok, that's more information, but I'm still a little stuck.  I don't know how to explain where I'm stuck, so please bear with me while I try.

If you want to use the field type, you can just add another field of type labels.  My little brain is stuck on why this is not the right answer for you.  Labels are editable fields, you can have many of them (although I'd avoid the use of similar names) and hence I'm not sure what you're looking for.

So, you mention the aui documentation - that implies you're trying to do something with the UI, and that you're actually trying to write something, but I don't know what it might be, as there's no context.

0 votes

It sounds like you could be trying to perform one of many operations:

Depending on which one you are trying to do (and how you are trying to do it) our answers will change. For example, are you trying to get an Atlassian Connect add-on to do this?

The more information that you can provide us with the better. Cheers.

Hi Robert. Since I'm new to JIRA add-ons, I THINK that option 3 from your list is what I'm after. What I want to do is add a labels-like field in a web section on an Issue screen, but have that field display my data (a new property for the Issue object that I will create). And yes, I want to achieve this with an Atlassian Connect add-on.

Ah, ok, so I really wasn't getting that from the question.

Yes, you want option three from Robert's list.  The question I still have is "what's wrong with the existing field types"?

Maybe a simpler question would be, what field type is the labels field? Because I want the same functionality.

I know where you're coming from, but the answer is really "it's a label type field".  The code behind it is written for labels, so the indexing, UI behaviour, suggestion stuff etc - all belong to the type "JIRA labels field". 

This is why I'm asking why you can't simply add another one of the same type but a different name.

I think we are nearing a mutual understanding smile I was confused because AUI doesn't list a "label-type field". I just noticed that a similar functionality is used for Fix Version/s on Issue screen. I guess that means I can use it for any data I need?

I think so - I think you want the UI of the labels field, but for some other type of field which has other behaviour that you'd want to change or drop.  I suspect you might find "component/s" is even closer to what you're looking for - it's a fixed list of options (users can't add items) but with type and search

I guess I'll just give it a try and see. Thanks.

Based on your response (and the fact that you don't seem to want to re-use the existing JIRA labels field to get the job done) here is what I would recommend:

If you want an example of this actually being done you can see how I did it on the "Round transition" page of the hackathon addon. Be warned though, that example is a bit dense. It might be easier just to build it yourself from scratch. It's not that hard and please ask me (by raising new questions on Atlassian Answers and mentioning me) if you have any questions on how to make it work. Cheers.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,084 views 4 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you