custom error message when attachment is not there

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

This widget could not be displayed.

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.

This widget could not be displayed.

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 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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Friday in Jira

New 5k User Limit and Other Cloud Updates

Hi all! Lauren here from the Enterprise Cloud marketing team.  I have some exciting Cloud updates from #AtlassianSummit that I wanted to share. We want everyone in your organization to be ab...

85 views 0 2
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