There are a few moderate changes coming with this release. The changes are backwards-compatible, so any code using API 16.x should work fine.
Jira Version | New API Version |
---|---|
7.2+ | 16.6.0 |
See Structure API Versions for full version information and downloads.
Support for aggregation over subtree part has been added. Four subtree part kinds are supported:
CHILDREN
– direct children only
LEAVES
– leaf forest rows only
STRICT
– full subtree without root node
SUBTREE
– full subtree
CoreAttributeSpecs.Param
; behavior is described in ReductionStrategy
. One can apply behavior to loader by subclassing ReducingAggregateLoader
and overriding ValueReducer.reduce
method (and other ValueReducer
methods if convenient). Chosen subtree part is specified by AttributeSpec
parameter 'type' (CoreAttributeSpecs.Param.TYPE
) and defaults to SUBTREE
.LongSumLoader
(changed)
NumberSumLoader
(changed)
AbstractDistinctSumLoader
(changed)
To support this change some other changes have been made:
Since distinct loaders can now accept parameters DistinctAttributes.NON_UNIQUE_ITEMS_SPEC
has been deprecated and DistinctAttributes
was marked as @Internal.
Handy SingleDependencyReducingAggregateLoader
(subclass of ReducingAggregateLoader
) was added.
Class SecureSingleDependencyReducingAggregateLoader
aggregates values from subtree part, replacing value to AttributeValue.undefined()
if user shouldn't have access to data by security reasons.
AttributeLoaderSecurity
encapsulates security checks. Can be used when SecureSingleDependencyReducingAggregateLoader
isn't applicable.
AttributeValue.isEmpty()
is a shortcut for !AttributeValue.isDefined() && AttributeValue.getLoaderData(Object.class) == null
AttributeValue.ofNullable()
is a shortcut for value == null ? AttributeValue.undefined() : AttributeValue.of(value)
NumberAccumulator.toNumber()
is a shortcut for NumberAccumulator.toValue().getValue()
AbstractAggregateLoader.firstChildError()
method traverses errors through AttributeLoader.Aggregate
. Used to transmit formula errors (other loaders currently don't supply error values).
ForestSpec
-sensitive attributesAttribute values can now depend on the forest spec for which the attribute is requested. Two new methods have been added to AttributeContext
to support this:
getBaseForestSpec()
returns the ForestSpec
, if there is one;getBaseStructureId()
returns the structure ID part of the base forest spec.Also there is a new version of StructureAttributeSpec.getAttributeValues()
, marked @Internal
.
The Notes column introduced in Structure 4.1 now uses the base forest spec instead of the structureId
parameter, which has been removed.
A constant and a static method have been added to support the Request Type from Jira Service Desk as a separate item type:
CoreItemTypes.REQUEST_TYPE
CoreIdentities.sdRequestType()
Added GenerationContext.getForestSpec()
, which returns the forest spec being generated.
ValueFormat.ANY
, introduced in version 16.5.0, is now supported by the REST API.
Added new versions of ForestAccessCache.getInvisibleRows()
which accept LongSizedIterable
as input. The old methods accepting LongList
are now @Deprecated
, kept only for binary compatibility.
ArrayForest.moveSubtreeAtIndex()
now returns -1 if no move is needed, i.e. the subtree is already at the given location.
@NotNull
and @Nullable
annotations have been added in multiple places to clarify nullability contracts.