I have created a very simple test script to figure out how to attach a file to an issue. The "file" is actually just text that I want to create a file. Since this is in the Cloud, I am assuming that I can't write the file to a temp file in order to import it.
import org.apache.http.entity.ContentType;
String text = "This is a simple set of text"
def response = Unirest.post("/rest/api/3/issue/CDFT-1/attachments")
.header("Accept", "application/json")
.header("Content-Type", "text/plain")
.header("X-Atlassian-Token", "no-check")
.field("file", text.getBytes(), "text.txt")
.asJson();
I get a 415 - Unsupported Media Type error from this. Any help is welcome
I am sorry, I don't understand what you are asking for here.
I can see you're looking at scripts, but I don't know what you mean by "path for saving those scripts for having an auto complete path while typing the name of the script into the path field"? Could you explain that?
Hi Nic,
thanks again for the reply and sorry for not being clear in my question, i was only asking for the default folder where to store the scriptrunners scripts to be viewed detected with only the name of the script not the full path while choosing "File" and not the script console view.
I found the folder and it is /Jira_Home/datalatest/Scripts where to store the scripts to be automatically detected with the only the name nd not the full path.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.