custom error message when attachment is not there



Is it possible to show a custom error message when the attachment is not present in the file system? We trim and archive our old attachments regularly and before (v3) the user was presented with an error 404, which was somewhat useful, but now its a generic 500 server error which causes the user to panic wink


2 answers

0 vote

You'll need to hack the core code, changing the behaviour of the error and throwing up your own page.

JIRA expects the attachments to be there, so you're effectively corrupting it and putting it in an invalid state by doing what you're doing.  You would be far better off writing some code to delete the attachments over REST, leaving a comment about what you've deleted.

Well, removing attachments is not ideal either, people are expecting attachments in the attachment section and not as a note buried in the comments about them being removed.

Not sure if Atlassian is reading this, but this is part of a full data lifecycle management which every decent product needs to have, you can not just keep piling stuff and throw hardware at it in hope Moore's law will work in your favor, at some point you have to start trimming/archiving/compressing or whatnot.

Yes, I know that. My point is that you're breaking things and causing yourself issues instead of providing a decent workaround. Deleting the attachments and adding a comment is a far better option that what you're doing, but yes, I'd also prefer some way of making the attachments area say "we removed attachment called x" instead of a comment. I'd raise this over at as an improvement. I suspect there's something there already, but it might have been bundled in with an "archiving" idea that ground to a halt and died a couple of years back.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,183 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot