Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,661
Community Members
 
Community Events
165
Community Groups

Bitbucket plugin not compatible to new version of Bitbucket (Atlassian Bitbucket v7.6.5)

Hi,

 

We implemented a Bitbucket plugina couple of years ago, and the Bitbucket version at that time is v5.16.3. What the plugin does is to add a new tab in the pull request page and show customized information in the new tab.

 

The plugin worded fine until our Bitbucket server is upgraded to v7.6.5. I have made changes in the POM to picked up the latest Atlassian dependencies. After fixed some the compilation issues, the plugin package (.obr) can also be installed in the new BB server. However, the tab is not showing at all in the PR page. I did noticed that there is a new tab "Builds" in the new version's PR page.

 

Is this compatibility issue can be easily addressed with dependency updates and/or src\main\resources\atlassian-plugin.xml file? Or do we need to make extensive changes to the implementation of our plugin as well? If the latter, where can we find a good example to start with? 

 

Thanks.

 

Here is the atlassian-plugin.xml file with our group ID masked out:

<?xml version="1.0" encoding="UTF-8"?>

<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}"/>
<param name="plugin-icon">images/pluginIcon.png</param>
<param name="plugin-logo">images/pluginLogo.png</param>
</plugin-info>
<!-- add our i18n resource -->
<resource type="i18n" name="i18n" location="myPlugin"/>
<!-- add our web resources -->
<web-resource key="bitbucket-resources" name="Bitbucket Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<dependency>com.atlassian.plugins.jquery:jquery</dependency>
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="highlights.css" location="/css/highlights.css"/>
<!--<property key="plugin-css" value="text/css"/>-->
<resource type="download" name="highlights.js" location="/js/highlights.js"/>
<resource type="download" name="builders.js" location="/js/builders.js"/>
<resource type="download" name="sessionCache.js" location="/js/sessionCache.js"/>
<resource type="download" name="utils.js" location="/js/utils.js"/>
<resource type="download" name="images/" location="/images"/>
<!-- <context>atl.general</context>-->
</web-resource>

<client-resource key="soy-templates" name="Soy Templates for custom settings">
<directory location="/templates/" />
<dependency>com.atlassian.bitbucket.server.bitbucket-web:global</dependency>
</client-resource>

<servlet name="Highlights Servlet" i18n-name-key="highlights-servlet.name" key="highlights-servlet" class="com.<my_group_id>.servlet.HighlightsServlet">
<description key="highlights-servlet.description">The Highlights Servlet Plugin</description>
<url-pattern>/highlights/*</url-pattern>
</servlet>

<web-item key="pull-request-plugin-tab" name="Pull Request navigation tab" section="bitbucket.pull-request.nav" weight="60">
<label>Highlights</label>
<link linkId="pullRequestHighlights">/plugins/servlet/highlights/${pullRequest.toRef.repository.project.key}/${pullRequest.toRef.repository.slug}/${pullRequest.id}</link>
</web-item>

<client-resource key="pr-ccq-resources" name="Pull Request CCQ Resources">
<directory location="/ccq/css/" />
<directory location="/ccq/js/" />
<directory location="/ccq/templates/" />
<resource type="download" name="sessionCache.js" location="/js/sessionCache.js"/>

<dependency>com.atlassian.auiplugin:ajs</dependency>
<dependency>com.atlassian.bitbucket.server.bitbucket-web-api:pull-request-web-panels</dependency>
</client-resource>

<client-web-panel name="PR CCQ link" key="pr-ccq-panel" location="bitbucket.pull-request.related-entities" weight="2000">
<client-context-provider>plugin.ccq.render</client-context-provider>
<resource name="view" type="soy" location="my-group-id.bitbucket:pr-ccq-resources/ccq.plugin.prOverviewPanel" />
<dependency>my-group-id.bitbucket:pr-ccq-resources</dependency>
</client-web-panel>
</atlassian-plugin>

 

 

And here are the part of the dependency versions from pom file:

<mavenVersion>3.5.2</mavenVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<bitbucket.version>7.6.5</bitbucket.version>
<bitbucket.data.version>7.6.5</bitbucket.data.version>
<amps.version>8.0.2</amps.version>
<plugin.testrunner.version>2.0.2</plugin.testrunner.version>
<atlassian.spring.scanner.version>2.2.0</atlassian.spring.scanner.version>
<atlassian-spring-scanner-maven-plugin.version>2.2.0</atlassian-spring-scanner-maven-plugin.version>

 

1 answer

Hi @zhi zhang , starting from Bitbucket 7.0 the pull request page is using a new set of APIs called Client-Side Extensions. You will have to migrate your frontend plugin code to using CSE. You can read about this change here: API changelog page 

Here is the link to the guide on how to start using CSE:
https://developer.atlassian.com/server/framework/clientside-extensions/guides/introduction/

Thanks,
Maciej Adamczak
Atlassian Developer

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,262 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you