Issue with Jira Plugin After Upgrading from Version 8 to 8.5
Asked by Sergej Kalva:

Hello Atlassian Community,

I'm experiencing an issue with my Jira plugin after upgrading from version 8 to 8.5. When I move an issue without sub-tasks, everything works fine. However, when I try to move an issue that has sub-tasks, my plugin fails to load the script.

Here are some details:

* The plugin works perfectly for issues without sub-tasks.
* The problem occurs only when moving issues with sub-tasks.
* The script associated with the plugin does not load during the move operation.

How look my document with sub-task:

\<html\>

\<head\>\</head\>

\<body\>\</body\>

\</html\>

and without:

It\`s full

Could this be related to the version upgrade? Any insights or solutions would be greatly appreciated.

Thank you!


Answers:
author: John Price
body: Hi Sergej -

Yes, this could easily be the problem. When upgrading Jira Data Center, you need to first verify that all plugins are compatible with the new Jira version. Is this a commercial plugin on Marketplace or is it something you wrote yourself? General steps for commercial ones:  

<br />

* Check the version of the plugin in your instance.
* Go to Marketplace and read the documentation and/or version history to check compatibility.
* Upgrade the plugin if necessary.
* Contact the plugin vendor for support if needed.

comments: author: Sergej Kalva
body: Hi, John! Thanx for answer. It\`s my plugin. This problem does not exist on Jira version 9.0. But I need to use version 8.5. :)

Can you provide links where I can see the cause of the problem? Or where I can see the differences between the versions?


author: Sergej Kalva
body: I found where the problem is.

I get in the parameters into my filter

```
FilterChain chain
```

This is a java class. And I get parametr

```
ServletResponse servletResponse
```

From servletResponse I get response

```
HttpServletResponse response = ((HttpServletResponse) servletResponse);
```

And from response I get capturingResponseWrapper

```
HtmlResponseWrapper capturingResponseWrapper = new HtmlResponseWrapper(response);
```

I get request from servletRequest, wich I get from parametrs

```
HttpServletRequest request = ((HttpServletRequest) servletRequest);
```

after that I do

```
chain.doFilter(request, capturingResponseWrapper);
```

And, whet isuue is without sub-task, capturingResponseWrapper have a full body,

with, empty. May be it\`s important, in request.getQueryString() with sub-task is 5396403, without 5396400

Any reasons please.


author: John Price
body: Hey -   

It's been a while since I wrote custom plugin so this is not something I can help with really, but it sounds like you are making progress. You will have better luck getting help if you can post:  

* exact Jira version (8.5.??)
* exact API and version you are using
* calls you are making and sample parameters
* full value of correct/bad responses

Since you say it worked in 8 and works again in 9 but not 8.5, you can also [check the bug database](https://jira.atlassian.com/issues/?jql=project%20%3D%20%22Jira%20Data%20Center%22%20AND%20summary%20~%20plugin%20AND%20issuetype%20%3D%20Bug%20AND%20fixVersion%20is%20not%20EMPTY%20).


author: Sergej Kalva
body: ```
log.error("Before chain.doFilter, Request URI: " + request.getRequestURI());

chain.doFilter(request, capturingResponseWrapper);

log.error("After chain.doFilter");

if (response.isCommitted()) {
    log.error("Response is already committed.");
} else {
    String capturedHtml = capturingResponseWrapper.getCaptureAsString();
    log.error("Captured HTML: " + capturedHtml);
}
```

in case with sub-task, I get Response is already committed.

My jira V (v8.5.16#805016-sha1:638b76f)   
API 9.6.0


author: John Price
body: I thought that might help me, but I'm still stumped. Hopefully someone with deeper knowledge of plugin development will come along!


Tags: jira-unknown-hosting-type

unknown-hosting-type