Hello,
I have been looking over a problem in ConfiForms for confluence. When a user uploads an attachment and we want to send this attachment to a Jira ticket, if the attachment has any special characters (i.e.: czech diacritics í, á, ý, č and so forth) the ticket fails to create with the following error:
JiraStorageException{statusCode=0, message=com.atlassian.sal.api.net.ResponseException: Error communicating with Jira service: Status: 500 with message: and response: 'Got error while saving attachment Sn?mek obrazovky 2025-08-26 100522.png: Got exception while saving attachment in attachment store. Exception: Illegal char at index 8: 59905_Sn?mek obrazovky 2025-08-26 100522.png' Got error while saving attachment Sn?mek obrazovky 2025-08-26 100522.png: Got exception while saving attachment in attachment store. Exception: Illegal char at index 8: 59905_Sn?mek obrazovky 2025-08-26 100522.png, isUnauthorized=false, isForbidden=false, isBadRequest=false, url='https://our-jira-url/rest/api/latest/issue/DAI-159/attachments', jql='null', authURI=null, type=DATA}, Used JSON:What I am trying to think about now is how to prevent it (i guess with a validation rule), but the best would be to replaceAccents on the file name. But no matter how I try, I cannot figure out if it is possible to rename an attachment or just parse it somehow to the IFTTT for Jira create ticket function.
Could you try to upload the very same name attachment via REAT API directly to see if that is not the issue with a (Jira) server (or a proxy server) configuration - https://docs.atlassian.com/software/jira/docs/api/REST/9.17.0/#api/2/issue/{issueIdOrKey}/attachments-addAttachment?
Regarding the validation, if you add a ConfiForms Rules for Field Definition macro with condition to be something like
!file:[empty] AND file.asAttachments.transform(fileName).asList.matches(^[a-zA-Z0-9\.]*):false
(assuming your "attachment field" is named "file")
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.