Child pages
  • API Changes in Structure 1.6

This documentation relates to an older version 1.6 of the Structure Plugin for JIRA. View the current documentation home.

Skip to end of metadata
Go to start of metadata

1. Major API Release

We have to make a number of incompatible changes in API when working on Structure 1.6. If you're using the API, please check these change notes and see if you need recompile your code.

JIRA Version

New API Version

4.3.x

6.0.0

4.4.x

6.0.1

5.0.x and later

7.0.0

See Structure API Versions for full version information and downloads.

2. Incompatible Changes

2.1. IncrementalSyncData changed

It is now an interface, so you cannot instantiate it. The old methods are remaining the same, but there's a new method getSyncEvents, which allows you to get a list of events (not issues) that should be synchronized. This allows for a more fine-grained synchronization algorithms.

The class representing the event - SyncEvent - is part of this change.

2.2. IssueListener changed

IssueListener.onIssueChanged() now accepts JiraChangeEvent and not long as before. If you've used our IssueEventBridge to listen for events, you need to update your listener. On the same note, IssueEventBridge methods for reporting the events changed as well - see the API.

The new classes JiraChangeEvent, IssueChangeEvent and LinkChangeEvent are part of this change.

2.3. StructureListener.StructureChanges is now an interface

You can no longer instantiate this class. We hope you didn't need to, before.

2.4. ModuleStopListener utility class removed

It wasn't working well as it could miss component destruction in some events. If you were using it, consider switching to DisposableBean.

2.5. AbstractSynchronizer.issueDebug() is not a static method

It used to be an instance method, but we had to convert it to a static one. If you had used it, recompilation is required.

3. Compatible Changes

3.1. Support for plugin defaults in StructureConfiguration interface

A number of methods have been added to StructureConfiguration to support persistence of the new settings – default structures and UI settings such as auto-switch.

Documentation for the features: Changing Structure Defaults, Structure Options for the Issue Page

3.2. StructureManager new method: getSingleViewableStructureId(User)

The new getSingleViewableStructureId(User) in StructureManager allows to detect that the user can only see a single structure, and this can be used to simplify the user interface (for example, hide the structure selector).

3.3. Forest new methods

  • Method getPathForIndex(int) to get the path to an issue, similar to getPath(long)
  • Method foldUpwards(ForestParentChildrenClosure) for efficient traversal and folding of the forest from bottom to top, comes with auxiliary classes ForestParentChildrenClosure and others.

3.4. StructureListener.StructureChanges.getForestOps()

Class StructureListener.StructureChanges now contains method getForestOps() that allows you to inspect the events that have happened in detail. This is especially useful in synchronizers.

3.5. SyncController additional methods

SyncController now has another variant of incrementalSyncRequired method that accepts a JiraChangeEvent.

3.6. Safer Structure methods

Methods getName() and getDescription() now return non-null values always.