Looking for bridge API lib for compatibility jira-api version 7.x and 8.x, similar to jira-cross-compatibility-lib-bridge-api

Hi guys,
I’m using the SearchService to perform my issue searching, but there is a breaking change in the API between Jira 7.13 and Jira 8.x.

For Jira API version 7.13.5, the API looks like this:

SearchResults searchResult = searchService.search(user, query, filter);
return searchResult.getIssues();

But for Jira API version 8.8.5, it changed to:

SearchResults<Issue> searchResult = searchService.search(user, query, filter);
return searchResult.getResults();

This makes my plugin compatible with only one major version of Jira, either 7.x or 8.x. It cannot work for both versions with just one jar.

My expectation is to support both Jira 7.x and 8.x with just one jar. I found some articles and design patterns called “Bridge” to handle this problem, but up to now, I couldn’t make it work. Here are the links:

After some time trying to implement my own bridge, I found a library which already does this for me, it called jira-cross-compatibility-lib-bridge-api, and here are the dependencies:

<dependencies>
  <dependency>
    <artifactId>jira-cross-compatibility-lib-bridge-api</artifactId>
    <groupId>com.atlassian.jira.compat</groupId>
    <version>0.51</version>
  </dependency>
  <dependency>
    <artifactId>jira-cross-compatibility-lib-bridge-factory</artifactId>
    <groupId>com.atlassian.jira.compat</groupId>
    <version>0.51</version>
  </dependency>
</dependencies>

This library contains many bridges for many services, but seems like it has been stopped developing, the bridges are just for Jira 6.x and 7.x.

I’m looking for:

  1. A library similar to the above one to handle API breaking change
  2. A discussion in this post about this compatibility problem. Is there any example or best practice which are solving this

Hi,

I’ve written exactly that library to bridge SearchService. There does not appear to be any compatibility library as of right now.

I cannot open source it due to licensing questions (waiting for a response since 26.03.2020). :frowning: as I’m using Spring Java Config. The license is https://www.atlassian.com/legal/software-license-agreement which maps to https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/
Without an official response or clarification there’s nothing I can do.

I will create a blog post soon about this. I can provide additional details if you’d like to implement this by yourself.

4 Likes

Hi @dennis.fischer,

It is great to hear that.
If there is nothing for me to reuse, so I’m really look forward to your blog post, then I can build a bridge on my own.

Thanks a lot for your help!