Skip to main content
Skip table of contents

Building Forest Specification

A forest specification, or ForestSpec, is a way for your code to identify the forest that you'd like to access. The forest may come from different sources – it could be a structure, it could be a transformed structure, it could be a result of query or some other types of forest source.

So the first step before you read or update a forest is to create an instance of ForestSpec. Here are some examples of how you can do that.

Desired forestForestSpec expression
Base Content
Structure #123
CODE
ForestSpec.structure(123)
Result of a JQL query
CODE
ForestSpec.sQuery("jql", "priority = Blocker")
Result of a text query
CODE
ForestSpec.sQuery("text", "text to find")
Adjusted Content
Structure #123, sorted by Priority
CODE
ForestSpec.structure(123).transform(
    CoreStructureGenerators.SORTER_ATTRIBUTE, ImmutableMap.of(
        "attribute", (Object) ImmutableMap.of("id", IssueFieldConstants.PRIORITY, "format", "order")
        "desc", true
    )
);
Structure #123, skeleton only (without dynamic content)
CODE
ForestSpec.skeleton(123)
Structure #123, with title row
CODE
ForestSpec.skeleton(123).withTitle()


More details are available in Javadocs for ForestSpec.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.