Skip to end of banner
Go to start of banner

Groovy Macro

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Name

Groovy Macro

Plugin

Script Plugin

Description

Java scripting using Groovy

Documentation

  • Help available in the notation guide.

Common parameters

Pre-defined variables

  • See Script Plugin for common variables
  • html - MarkupBuilder for easily building html output

For 3.2.0 and above

  • bandanaManager
  • labelManager
  • pageManager
  • spaceManager
  • permissionManager
  • contentPermissionManager
  • attachmentManager
  • commentManager
  • userManager
  • settingsManager

Usage

{groovy}
println("Hello world");
{groovy}
{groovy:output=wiki|script=#example.py|var1=test}
{groovy} 
{groovy:var1=hello|var2=world}
print "Output parameter"
print var1 + var2
out.println(var1 + var2)
{groovy}

Using the html markup builder

{groovy}
def list = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']]
html.table(class: 'confluenceTable') {
  tbody {
    list.each { row ->
      tr {
        row.each { column ->
            td(class: 'confluenceTd', column)
        }
      }
    }
  }
}
{groovy}

Security

This macro supports Macro Security Plugin.

Open Issues with this component

type key summary reporter assignee priority status

Unable to locate Jira server for this macro. It may be due to Application Link configuration.

  • No labels