Page tree
Skip to end of metadata
Go to start of metadata


Labelomat is confluence plugin used for automatically adding or removing labels to confluence content (namely pages, blogs, comments or attachments) based on statistical data such as number of comments for pages in given space, number of likes of comment, how many times page were edited, how old is given blog post and much more.

How it works

Labelomat consists of two main parts specifying adding or removing labels:

  • Rule
  • Condition

Example Scenario

To best explain how it works let's look at simple use case scenario.

Let's say that you want to add label popularpage to every page in space Product Team with space key PRTE, when the page receives at least 5 likes in last 30 days and at least 5 comments in last 20 days. With Labelomat plugin you will simply create rule and conditions for it and the Labelomat plugin will simply add this label whenever a page meets these condition. Check images below to see how these rules and conditions would look like:

  • Condition saying that page received at least 5 likes that are younger than 30 days

  • Condition saying that page have at least 5 comments that were created in last 20 days

  • Active rule saying Labelomat will add label popularpage to pages of space with space key PRTE based on condition pageLikes5LT30D and pageComment5LT20D

Navigation to Labelomat's configuration

You can find link to Labelomat's configuration in admin section of confluence:

Description of fields

Check tables below explaining the possibilities of setting up rules and condition to handle automatic adding or removing labels from pages, blog post, comments or attachments.

Rules

Attribute nameDescriptionExample of valueRestrictionRequired
Rule NameDescriptive name of the rule.

Suitable name for rule, for example:

Old Pages Rule

Rule name have to be unique.

  •  
Space

Specifies space where this rule will be used.

Space key of your space.

Consider having space with spacekey FOO.

If you want that only pages, blogs, comments and attachments in space with space key FOO will be affected by this rule put FOO in this field

You can specify key of personal space here. Personal space keys starts with ~. So for example user admin have personal space with space key ~admin.

Use space key.

Space with given space key have to exists.

  •  
Space Scope

Says whether rule will be used in only global spaces, only personal spaces or in both global and personal.

If field Space is filled field Space Scope will be prefilled with value Concrete Space.

Select value from list:

  • Personal
  • Global
  • Both

If field Space is filled with space key, field Space Scope will be prefilled with value Concrete Space.

Use one of the offered values from Space Scope drop-down.

Keep value Concrete Space when field Space is filled.


  •  
Page Path

This rule will be applied only for pages/blog posts having page hierarchy that matches given regular expression value.

You can use online tool like for example https://regexr.com/ to check your regular expression.



Check Field Page Path how to determine regex value and see better examples.

Use regex to specified page path hierarchy structure.

  •  
ConditionsConditions written in this field will be used to resolve whether label will be add/removed from page, blog post, attachment or comment.Check Field Conditions for better examples.

Use condition names in quotes separated by logical values & and |.

Conditions must be in quotes.

Only Conditions with same content type can be written in same rule.

Condition must exist.

Condition cannot be deleted if there is a rule using it.

  •  
ActionThis field says whether label should be added or removed from page, blog, comment or attachment.

One of the offered values from the Action drop-down

  • ADD - choose ADD for adding the label
  • REMOVE - choose REMOVE for removing the label
Use one of the offered values from Action drop-down.
  •  
LabelThe actual label that will be added or removed.Suitable name of the label.

These characters cannot be used:


!#&()*,.:;
<>?@

[

]^~

White space is also forbidden.

  •  
EnabledBoolean value saying if you want this rule to be active or not.


Use checkbox.
  •  


Conditions

Main Idea

Conditions are based on Confluence Events such as page edition, comments or likes. So each time someone edit a page, make a comment or like a content, and rule with relevant condition is active, labelomat checks whether label should be added or removed. Conditions gives powerful way to choose when label should be added or removed.

Conditions Fields overview


Attribute nameDescriptionExample and BehaviorRestrictionRequired
Descriptive name of the Condition.

Suitable name for condition, for example:

five or more comments

Must be unique.

These characters cannot be used:

()"&|
  •  
Event Count says how many times given event occurred in past.

Event count has three possible format:

  • saying that event occurred one to five times: 1-5
  • saying that event occurred more than five times: 5-
  • saying that event occurred exactly five times: 5

If left empty value 1- will be used.

For Event Type Create field Event Count will be greyed out and value 1 will be used.

Use correct format, one of:

  • number-number
  • number-
  • number

When using format number-number, logically the first number is less than the second number, so for example value 5-1 is invalid.

Number must be greater than 0.

For Event Type Create field Event Count will be greyed out and value 1 will be used.

  •  
Content Entity TypeWhat type of content will be affected by this condition. Meaning label will be added to this type of content.

Select one Content Type from drop-down. Possible values are:

  • Page
  • Blog
  • Comment
  • Attachment
Use one of the offered values from Content Entity Type drop down.
  •  
Event TypeField saying what type of events should be counted.

Select one Event Type from dropdown. Possible values are:

  • Create- checks when a content was created
  • Update- how many times a content was updated
  • Like- how many likes users gave to a content
  • Label- total number of labels
  • CommentCreate- how many comments were created on page or blog post
  • AttachmentCreate- how many attachments were created on page or blog post

Use one of the offered values from Event Type drop down.

CommentCreate and AttachmentCreate only works with Content Entity Type Page and Blog.

Like cannot be given to Content Entity Type  Attachment.


  •  
Events are old

This attribute has two fields. First field is dropdown with values Less than and More than, second field represent time interval.

First field - use one of the values from the dropdown.

Second field - use specific format and values for example.

Check Fields Event are Old for better examples.

First field - use one of the values from the dropdown.

Second field - use specific format and values.

  •  
This one says that only events triggered by this user are counted.

For this field use Username.

You can use value Anonymous if you want to label content affected by anonymous users.

Use Username.

When field User is filled, field Group cannot be used.

  •  
GroupSimilar to user, only events triggered by any user which belong to group specified by this field.For this field use Group name.

Use Group name.

When field Group is filled, field User cannot be used.

  •  




  • No labels