Bitbucket plugin not compatible to new version of Bitbucket (Atlassian Bitbucket v7.6.5)
Asked by zhi zhang:

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>
```


Answers:
author: Maciej Adamczak
body: Hi [@zhi zhang](/t5/user/viewprofilepage/user-id/3589652) , 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](https://developer.atlassian.com/server/bitbucket/reference/api-changelog/#changes-related-to-the-new-pull-request-experience-)

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


Tags: app

bitbucket-server

development

server