It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jelly Create attachment error: unable to make temporary copy of file

Jelly script file attachment error: Unable to make temporary copy of file:

I have tried:

1. back-slash and forward slash in the path

2. checked the file permissions

3. changed the file locations and finally changed the computer.

I get the same error everywhere.

I know that there is another question: but that is yet unanswered.

I can create a defect manually and attach the same files in the manually created defects, but it fails in Jelly script.

Can anyone shed some light on this issue?

1 answer

1 accepted

0 votes
Answer accepted

I get this error too. It's always because I've got the path wrong on the file. Could you show us two things please?

  • The line of Jelly doing the import
  • The physical location of the file on the server running Jira (full path and name)

I tried:

<jira:AttachFile key="${key}" filepath="E:/Template/Bug.jpg" option="override"/>

then this:

<jira:AttachFile key="${key}" filepath="E:\Template\Bug.jpg" option="override"/>

I got the same error:

Exception: org.apache.commons.jelly.JellyTagException: null:3:0: Unable to make temporary copy of file.

The location of the file is: E:\Template\Bug.jpg

Ok, the second one looks right to me, but I have a nagging doubt that you might need to escape the backslashes in the path - try E:\\Template\\Bug.jpg

Also, can you check that the user running the Jira service has full read/write access to the Bug.jpg file on the server?

E:\\Template\\Bug.jpg ---Tried this too.

In the 2nd line in your comment: I am running Jelly script from my PC (so I have access rights). And I have System Admin rights in JIRA. Also, I could create a defect manually, with the same file as attachment.

Is manual issue creation any different from Jelly script creation? If so, then what should change: "Reporter"?

I have tried creating a bug first and then adding an attachment- as in a different Jelly script, not in the same one. That fails too. So, I assume it has something to with the access permission. But what could be above SysAdmin?

Ah, hang on, I think you've missed something. I said to check

  • The physical location of the file on the server running Jira (full path and name)

I have a feeling e:\template\bug.jpg is on your machine, and not the server? The files you are trying to attach must be on the Jira server.

@Nic: So, the real issue was "file on the server". Yes, I did miss that. I think my problem is solved now. Thank you.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Next-gen

Keyboard shortcuts have arrived for next-gen projects!

...ollected feedback from users around the lack of shortcuts, and we’re here to address that: In next-gen projects, I miss the keyboard shortcuts badly. This is particularly true on the Board, but also i...

102 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you