I know how to add an image in an issue but I can t find how to add an image to an automation task. Thanks in advance for your help.
Unfortunately there is not a function to add attachments from within Automation. That is, you cannot add an attachment to your rule itself to then attach to issues. That would be pretty handy, but probably a nightmare to architect.
Anyways, yeah even though this documentation says:
You can copy attachments by selecting the Attachment field from the list of supported issue fields and then choosing the source issue from which attachments need to be copied.
As you likely found, it limits the source issue to related issues. In JRACLOUD-78891 I commented that it would be nice if you could Copy Attachment(s) from an arbitrary issue (like a "template" issue or a "attachment repo" issue). But there was never any response.
Here is a Suggestion you can vote for:
Now... I was trying to think if there would be a way to do this by sending a web request through the REST API but the problem is to add attachments you have to do a POST and for that you have to be able to specify a local file, and well, we're back to AUTO-454 above.
Ah, a related answer from the esteemed @Jack Brickey suggests you might be able to do something with a ScriptRunner post-function.
I usually run away screaming from Groovy, but I found this article that does make it look possible:
SOLVED: attach a file using REST from scriptrunner
The big question in my mind is whether Groovy is able to 1) grab a binary attachment (the example shows text) from "somewhere" on the Internet and 2) store it in memory (?) so that it can then actually include it in the post.
Ohai @PD Sheehan - have you ever done any work with ScriptRunner in the Cloud?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hrm, this seems like it might be useful for "downloading" the file from another issue. The question is how to then "upload" it as an attachment to the new issue:
I guess perhaps you would somehow combine it with the previous post:
Bit caveat here - you'd need to pay for the Scriptrunner app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Darryl Lee sorry, no. Never worked with cloud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.