custom error message when attachment is not there

Aleksandar Ivanišević January 10, 2016

Hi,

 

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

regards,

2 answers

0 votes
Aleksandar Ivanišević January 14, 2016

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 14, 2016

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 https://jira.atlassian.com 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.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 10, 2016

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.

Suggest an answer

Log in or Sign up to answer