Is there any way to change the "Issue can't be viewed" page via custom plugin? I want to add simple link on this page or directly redirect to another page.
There was some kind of solution for this problem, but it crashes the JIRA.
Jira versoin: 7.5.3#75008 (server).
The one way to change "Issue can't be viewed" page is to implement custom servlet-filter plugin. Credits goes to @Alexey Matveev for an original idea.
I've come with next <servlet-filter> declaration:
<servlet-filter name="My Servlet Filter" i18n-name-key="my-servlet-filter.name" key="my-servlet-filter" class="ru.temp.servlet.filter.MyServletFilter" location="before-decoration" weight="100">
<description key="my-servlet-filter.description">The My Servlet Filter Plugin</description>
<url-pattern>/browse/*</url-pattern>
</servlet-filter>
The most important things in this declaration is:
Also, you may find these links useful:
response.setCharacterEncoding(response.getCharacterEncoding()
); // You can preserve original response encoding
response.getWriter().write(out);
I think you should develop a servlet filter. You can find an example here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sounds like a solution, thank you.
There's no uniform URL for an "Issue can't be viewed" page though - I'm not sure, if filter may be applied specifically to this page, instead of all "https//jira/browse/*" pages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did not try it but try to attach it to the browse page and see how it works. Or try to attach it to the error page. And have a look at the result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, it seems it's not going to be easy.
As mentioned in problem here and also here, some URL's just can't be intercepted with custom servlet filter.
I've tried to implement my own filter with a logging of init() and doFilter() methods, but it only logs init() method (i.e. filter is only initialized but never called).
Url-pattern is :
/browse/*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
UPDATE: change of filter location to after-encoding helped, going to explore on that one.
UPDATE 2: setting filter location to before-decoration seems to intercept just at right time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solution worked. Thank you.
Two things which helped me:
response.setContentType("text/html; charset=UTF-8");
response.setCharacterEncoding("UTF-8");
response.getWriter().write(out);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am glad to hear it. Could you post here what was your <servlet-filter> decalration in the atlassian-plugin.xml?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Or you can post your own answer and accept it. It would let other people with similair question to find your answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.