Custom Plugin Compatibility for Jira 9

Hi Guys,

We have a custom developed plugin which we are currently using it in our Jira 8.20. We are also in process of upgrading to the version 9.4.X. For the same we have build the existing code to make it compatible with the 9 but we faced some error like “405 Method not allowed”. Going through various discussions and documents we were able to resolve it but now we are seeing another issue where the ao values are displaying as null(attached screenshot) when uploaded to the Jira 9(dev) with the existing data. I saw few threads like Jira 9.0 has a release candidate! - #69 by mike1 but nothing is straight forward and the info is old enough. So, any help resolving this would be helpful as we cannot proceed with the upgrade until this gets solved.

Thanks in Advance.

The problem is most likely the fact that you’re using an ActiveObject entity directly in your Velocity templates.
This isn’t supported anymore by default, the easiest solution – which is a good practice in general – is to create some DTOs that map the entity to a different object. You can either roll your own classes, or use something like modelmapper, mapstruct…

1 Like

Hi Paolo,

Thanks for your update/inputs.

To be frank, I’m completely a new bee to this so not sure the terms you’ve mentioned for example “DTO”. So, please if there’s any reference of steps on how to setup this or if you be able to let me know, it would be very helpful for us as we are counting on this to be done in order to proceed with the upgradation by the next month.

Thanks in advance, happy weekend!!

Yagna Teja

Hey, basically you can’t use the entity directly, but if you create a separate class that contains the data that you need in your view, it’ll work.

If you have a CategoryAO class which is your ActiveObjects class, you can create something like

public class CategoryViewModel {
   private String name;
   private String id;

   // getters and setters, constructor...

Then when you fetch the data from AO, you can create CategoryViewModel objects from your raw entities (e.g. -> new CategoryViewModel(, and use those in your velocity templates intead.

Hi @PaoloCampanelli


Good day!! I know it’s been a long time since I’ve responded on your inputs. Thanks for the same.

The DTO approach really helped us to achieve what we were working on and was able to build the plugins with the required data. We’ve upgraded our jira version from 8.20.11 to 9.4.12 and have deployed the plugins. Everything went fine and business was able to see the data and create the issues. But, only thing we are facing is the server response time for the plugin data to load.

For example, when the users click on create issue button, it is taking almost like 15-20 secs to load the create screen and the same is with the edit as well. While the other projects where these plugins are not being used, the response time is quicker like 4-5 secs max. When we were checking the network tab under developer tools, we found the maximum time consuming in getting response from the db server(attached screenshot). We are stuck at this and seeking your help whether is there a way that we can optimize this loading time and make the screens(create/edit) load faster with the plugin data?

Any help in resolving this would be much appreciated, thanks in advance.

Yagna Teja

Well, most likely your queries are not optimized: for example you might want to add an index if you’re doing a WHERE, or it might be that you’re trying to fetch a huge amount of entries, or your DB is just slow, you can definitely check in your DB which queries are slow and how long they’re taking.