API Changes in Structure 5.3
Minor Java API Release
There are a few API additions 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.6+ | 16.13.0 |
See Structure API Versions for full version information and downloads.
Compatible Changes in the Java API
Version Name Items
In Structure 5.3 we introduce a new core item type, the Version Name. It represents the canonical (lower-case, trimmed) name of a Jira version, and is used by the new Version Name grouper to combine same-named versions from multiple projects. We have added the following static methods and constants to the API to support Version Name items:
CoreIdentities.versionName(String)
CoreIdentities.versionName(Version)
CoreIdentities.isVersionName(ItemIdentity)
CoreIdentities.canonicalVersionName(String)
CoreItemTypes.VERSION_NAME
JiraFunc.CANONICAL_VERSION_NAME
JiraFunc.PROJECTCONSTANT_DESCRIPTION
Arbitrary Parameters for Generic Items
We have added a parameter map to the GenericItem
class (available since Structure 4.5). Parameters are stored in the database, and let you associate arbitrary information with a generic item. The following methods have been added to the API:
GenericItem.getParameters()
GenericItem.Builder.setParameter(String, Object)
GenericItem.Builder.setParameters(Map<String, Object>)
We are currently working on a new item type, the Note, which will be based on generic items. There is a new constant for it, CoreItemTypes.NOTE
.
Deprecated Methods in Export API
The following methods in the Export API have been deprecated:
ExportRequestContext.requireAttribute(AttributeSpec, boolean)
ExportRow.get(AttributeSpec, boolean)
Starting with version 5.3, Structure handles the afterFiltering
flag for you, so you should switch to the single-argument versions of those methods.
Custom Final Step for New Structure Templates
It is now possible to skip the common final step in a new structure template wizard, if your template can automatically set the new structure name and permissions. A new default method and a constant have been added to support that:
NewStructureTemplate.hasCustomFinalStep()
NewStructureTemplateStep.CREATE_STRUCTURE