This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.

Label Tools Plugin

Name Label Tools
Vendor Adaptavist.com Ltd (Website)
Authors Alain Moran, Kelsey Grant, Guy Fraser
Homepage http://confluence.atlassian.com/display/CONFEXT/Label+Tools+Plugin
Issue Management n/a
Continuous Integration n/a
Categories Advanced Macros
Most Recent Version 1.1.3
Availability Confluence v2.1 to v2.10
State Stable
Support Unsupported Plugins
License Freeware / Open Source (BSD)
Price Donate
Release Docs http://confluence.atlassian.com/display/CONFEXT/Label+Tools+Plugin
Java API Docs n/a
Download Source n/a
Download JAR adaptavist-plugin-labeltools-1.1.3.jar
This plugin is also accessible through the Confluence Repository Client.

Description/Features

A macro which allows you to ensure that pages containing it are given a predefined label

  • add-label
  • choose-label - presents anyone viewing the page with a choice of labels if none of those labels have yet been set. Useful if you want to ensure one of a set of labels is always set. (from v 1.1)
Choose Label Macro

Example:

{choose-label:labels=orange,red,blue|title=Please Choose...|descriptions=An Orange,A Deep Red,An Ocean Blue} 

Parameters

  • labels A comma separated list of labels. These will be added when clicked on
  • title A title to show above the list of labels
  • descriptions An optional description for each label that is more human readable. This list must be the same length as the labels list.

Requirements

None.

Installation

  1. Install the plugin jar using the admin interface
  2. You're done!

Tested Environments (confluence vs plugin version)

v macro \ confluence > v1.4.x v2.0.x v2.1.x v2.2.x
v1.0
v1.1

Documentation

The macros in this pack are documented (with examples and related links) in our Online User Guide:

The macro also has accompanying documentation in the Wiki Notation Guide.

Version History

Version Comments Author
1.0
  • Initial release
Adaptavist.com
1.1
  • Added choose-label macro
Kelsey Grant

Future Development

If you have any comments or suggestions, report them in our issue tracker.

Labels

repository_current repository_current Delete
plugin plugin Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jul 14, 2006

    Kelsey Grant says:

    Try it now... I fixed it up, thanks.

    Try it now... I fixed it up, thanks.

  2. May 02, 2007

    Richard Southern says:

    Is there any way to get the choose-label macro to function like a radio button l...

    Is there any way to get the choose-label macro to function like a radio button list or is there some other macro that will do this?

    I want only 1 label from a list to be active on the given page at any time (to indicate status of the issue the page is tracking). The choose-label macro gets me half way there, but I need to remove the previous label when a new one is selected. I have a few examples:

    1. 2 labels that are mutually exclusive... issue-active and issue-inactive. I use these for a roll-up report with the metadata report macro, so an issue can't be on both lists at the same time.
    2. 3 labels, red, green and yellow to indicate pending or active problems. A page can't contain two color labels at the same time. These are also rolled up using the metadata reporter macro.
    1. Jun 06, 2007

      Brian M. Thomas says:

      This use case is one of many reasons that I am suggesting enriching the labels s...

      This use case is one of many reasons that I am suggesting enriching the labels system to function like general metadata, complete with namespace-qualified tags.

  3. Jun 06, 2007

    Brian M. Thomas says:

    Can't reach the adaptavist website to get the docs on this.

    Can't reach the adaptavist website to get the docs on this.

  4. Jun 29, 2007

    hernan g says:

    great idea. My thought is to use it to enable users to "tag" pages based on the ...

    great idea. My thought is to use it to enable users to "tag" pages based on the workflow status related to the issue the page represent. For that, it is good that I can let them select the labels instead of hoping they will type the right one.

     One problem: your macro only shows when there is no value from the list. Could we make an improvement so that it always shows, and maybe (for extra browny points) the label that is alrady used is disabled?

    Take it even further by adding an option to be exclusive selection of labels or not (meaning is one selection removes the others or not).

  5. Aug 16, 2007

    s wargnies says:

    Hi, The macro works perfectly with a fixed value or a  (VAR) in a template...

    Hi,

    The macro works perfectly with a fixed value or a  (VAR) in a template but...
    I am trying to get the macro working from a live-template of the scaffold pluggin.
    I want to select the value from a list-data and use it as a label.

    Does anybody knows how to get this thing working?

    Thanks

  6. Aug 30, 2007

    James Mortimer says:

    Here is a neat paradigm that might be either wrapped into the choose-label macro...

    Here is a neat paradigm that might be either wrapped into the choose-label macro, or a new incarnation of the macro. (It can also be supported by the new Approvals Workflow Plugin)

    Goal: Show a formatted block of text asking for a label, which is hidden if the label does not exist. Instructions or other links are included within the block that is hidden. This can be included in a zone-template (Zones Plugin) or an include.

    Currently requires: Visibility Plugin, Label Tools Plugin, section and column and div macros (I forget what plugin those are from)

    {hide-if:labels=apple,orange,banana}
    {div:style=background-color:#FCC;border:1px solid #A00;padding:5px;margin:5px;}
    {section}{column:width=50%}{choose-label:title=Select a fruit|labels=apple,orange,banana|descriptions=Apple,Orange,Banana}{column}
    {column}
    (i) Once you select an fruit, this box will not appear *next* time you visit this page or click *view*.
    
    (i) You can use the links in the yellow box below to set other labels for this page, or set them manually using the yellow 'edit' button above.
    {column}{section}
    {div}
    {hide-if}
    

    could be encoded more simply by:

    {choose-label:title=Select a fruit|labels=Apple,Orange,Banana|style=xxx}
    (i) Once you select an fruit, this box will not appear *next* time you visit this page or click *view*.
    (i) You can use the links in the yellow box below to set other labels for this page, or set them manually using the yellow 'edit' button above.
    {choose-label}
    

    Where xxx would override the style, but by default would be one of the default warning/info/note box colors.

    1. Aug 30, 2007

      James Mortimer says:

      Also, this user macro I call label-click is handy for creating non-hidden li...

      Also, this user macro I call label-click is handy for creating non-hidden links similar to choose-label. (I ripped the html from the choose-label macro). It could be rolled into the 'label tools' plugin.

      #if($param1 && $param1.length()>0)
      #set($text=$param1)
      #else
      #set($text=$param0)
      #end
      #if($param0 && $param0.length()>0)
      <script><!--
      var onLabelsChange = function (label) {
      	// silly IE seems to cry if you do this without showing the labels input
      	if( navigator.userAgent.toLowerCase().indexOf("msie") > 1) {
      		showLabelsInput();
      	}
      	document.addLabelForm.labelsString.value = label;
      	doAddLabel(true);
      }
      --></script><a href="#" onclick="onLabelsChange('$param0');">$text</a>
      #else
      <span class="error">You must specify a valid label, or list of labels separated by spaces, as the first parameter. eg. {label-click:my_label|My Label Title}</span>
      #end
      
  7. Dec 05, 2007

    Mark says:

    Repository not working. Shows there is an update but it can't be downloaded. Un...

    Repository not working. Shows there is an update but it can't be downloaded.

    Uninstalled

    When I go to install I get an errror

    javascript:document.getElementById('hmE6lXPkDkFJsklmyAb5CnAng').clicked();

    1. Dec 06, 2007

      Alain Moran says:

      Looks like a mistake in the metadata, this has now been updated.

      Looks like a mistake in the metadata, this has now been updated.

  8. Feb 04, 2008

    James Fleming [Atlassian] says:

    There's a small but critical issue with the latest version: while the filename i...

    There's a small but critical issue with the latest version: while the filename itself has been updated, atlassian-plugin.xml still contains <version>1.1</version> within the <plugin-info> section.

    This is causing updates via the Confluence Repository Client to fail with

    com.atlassian.plugin.repository.model.PluginVersionMismatchException: Expected plugin version [1.1.1] and got [1.1] from: http://confluence.developer.atlassian.com/plugins/servlet/proxy-counter/com.adaptavist.confluence.labeltools/3/http://svn.atlassian.com/svn/public/contrib/confluence/labeltools-plugin/trunk/dist/adaptavist-plugin-labelTools-1.1.1.jar

  9. Feb 15, 2008

    Joseph Sagir says:

    Hi How can I permanently delete a label...? I have labels rendered in {listlabe...

    Hi

    How can I permanently delete a label...? I have labels rendered in {listlabels} macro, labels which no longer have pages under them. I want to permanently delete these labels. How can I do this...?

    I know that it is not the most suitable place to ask this, but I need this urgently.

    Regards,
    Joseph

  10. Nov 26

    patrick dinneen says:

    Does anyone have an image of this working? I just want to see what it actually l...

    Does anyone have an image of this working? I just want to see what it actually looks like.

    Thanks,

    Patrick