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 votes

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 Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,708 views 17 21
Read article

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