Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Customising "You can't view this issue" screen

If a user attempts to view an issue they don't have permission for, say they're following a link from a document to an old project that has had the 'Browse Project' permission removed, they currently get a page saying "You can't view this issue, It may have been deleted or you don't have permission to view it."

Is there anyway to customise this screen?  We're required to have access to all old issues for safety reasons, but we also have about 70 projects that are no longer being worked on and haven't been for years.  I'd like to hide them from general users, but in the rare case somebody does need to access one I want to make it clear what to do.

1 answer

1 accepted

1 vote
Answer accepted
Mirek Community Leader Nov 21, 2019

Hi @cameronshiell ,

Actually a good question

There might be a page (template) that you can probably modify on the server, but without impacting the files you can try to create a redirection to a page or something that would give you information about projects, contact information, etc.

You should achieve it by adding a piece of JS code into your Announcement Banner..

How would the JS look like?

The idea behind the code is that when you load that error page containing specific element that is unique (in that case DIV with ID):

error-image.error-image-canNotBeViewed

you can do something (in that case whatever you want). I suggest a redirection somewhere (to a Confluence page for example), but you can also try to modify the page using JS if you know how to do it (of course)

So the final code would be something simple like this..

<script type="text/javascript">
jQuery(window).load(function(){

if (AJS.$("span.error-image.error-image-canNotBeViewed").length !== 0) {

var new_path = "https://google.com"

window.location.replace(new_path);
console.log("Redirection to a new page");
return false;

}
});
</script>

I hope it helps :)

This is a cool trick.

Like Mirek likes this

That's a really elegant answer, thanks!

Like Mirek likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

3,888 views 11 5
Join discussion

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