Hello All,
I am currently using Scriptrunner to clone an issue and attachments on a particular transition. Works great .. except I just discovered that the Attachment "Author" is not carrying over to the cloned issue attachment.
This is causing an issue, as the author is not able to delete the attachment in the clone.
Scriptrunner doesn't appear to allow me to remedy this situation. I can't even tell it to "not" copy the attachments so I can do it via custom script.
I was thinking to write yet another listener to "fix" this problem, but I could not find any method that would allow me to modify the attributes (add an author) to the attachment itself.
I am guessing my only recourse is to do a full custom object that handles the cloning, and all the details like attachments and their author meta data, and just not use scriptrunner for this operation?
Can anybody suggest any other solutions?
Hi @david-guild
You can try out the the scriptrunner's Clone issue custom listener on a particular events
just add your condition to check the transitioned status
which will provide you options to select particular fields to copy to targeted/cloned issue
BR,
Leo
Hi Leo,
That is what I am doing. Using the Scriptrunner "clone an issue and links" on event. The event is "issue resolved" (which I refer to as an transition ... from not resolved to resolved).
Yes, I have selected "copy all fields".
An Attachment "author" is not a core field, nor is it a custom field. It appears to be an "attribute set" that carry's fields such as AvatarUrls, timeZone, name, emailAddress, etc, etc).
When you clone an issue in Jira proper, the Author attribute set appears to copy over with the attachment.
When you use Scriptrunner to clone the issue, the Author attribute set DOES NOT copy over.
You should be able to easily test this.
Create an issue
Add an attachment
Use the scriptrunner to create a clone
Hit both issues (original + clone) with an API call
Look at the attachment section ... you *should* see there are different.
Clone the issue again, using native jira, check it against the original ... they *should* be the same. And both will be "different" then the scriptrunner cloned issue.
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.