Creating a custom label dialog with predefined labels

Bob Nicholson August 9, 2012

How can I create a custom label dialog with a predefined set of labels (and checkboxes to select them)?

What I'm looking for is something like the tag selection wizard that is used in this forum.

1 answer

0 votes
Natalie Hobson
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.
August 13, 2012

A custom field of the label type acts the same as the default label field. You cannot give it a set of predetermined values, but you can give it a single default value. You can, however, create multiple contexts, each with their own default value.

Are you sure a label type field is the kind of custom field you want? What functionality are you looking to accomplish with it being label type specifically?

Bob Nicholson August 13, 2012

When creating or editting a page, there is a button at the bottom called "Labels"

Clicking it brings up a dialog box with a field to enter one or more labels.

I want to constrain the label options by offering checkboxes that allow users to select from a predefined set of labels. (Although I'd liek to offer an open text box as well.)

Natalie Hobson
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.
August 13, 2012

Ah, above you said you wanted to create a custom field of the type labels, which is not what you are talking about now.

The suggested values displayed in the labels field will show any that have been entered by users for labels previously. If you want to remove them, you have to delete the values from any tickets that have that value. So, if someone has entered a value for the label field called "Superman", when you go to add a value to the labels field "Superman" will be a suggestion. If you remove the value of "Superman" from all issues that contain it in the labels field, it will no longer appear there as a suggestion when you attempt to add a value to the label field.

Labels are really meant to be a free-for-all way for those without admin access to create and/or modify custom fields to be able to add their own values to issues for various reasons. If you want to lock down the labels field, you are going to need to communicate to your users how you want them to use it, and periodically follow up to ensure they are using it in the manner you wish.

If you want a field with checkboxes or a list that has predetermined values set by you, then you will need to create a custom field (not use the labels field or a custom labels field).

Bob Nicholson August 13, 2012

I never mentioned a custom field... I was clearly said a "label dialog."

The functionality I need is very similar to the Tag dialog used in this forum. Check it out if you haven't used it. Isn't it possible to do that in Confluence?

Natalie Hobson
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.
August 13, 2012

Hi, terribly sorry - when you said "custom label" I assumed you meant a custom field of the type label; I did not realize you were talking about Confluence (my answer was geared towards the JIRA functionality of labels). I should have checked the label (HAHA) attached to your answer. :)

Labels for Confluence work much the same way as JIRA; they are intended to be for all users to be able to add specific documentation to a page so they can easily find and group content as they need. You may wish to ready up on labels in Confluence via the following documentation:

https://confluence.atlassian.com/display/DOC/Working+with+Confluence+Labels

https://confluence.atlassian.com/display/DOC/Using+Labels+to+Categorise+Spaces

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events