Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

custom error message when attachment is not there

Aleksandar Ivanišević
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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ć
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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
TAGS
AUG Leaders

Atlassian Community Events