Hi,
I have to create a complex solution for our customer but I'm stucked at a part.
The task, is to create a new issue that inherits some data from the original issue, and link the two tickets.
I'm trying to do it with IssueInputParameter, but it's not too flexible in adding CustomFields, cause it only accepts String parameters.
By this way I can't add value to the multi-user picker, th validation result is invalid all the times.
Does anyone knows a better solution?
Hi @Kiss Zoltán I remember we used few methods
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customField = customFieldManager.getCustomFieldObject(XXX)
newIssue.setCustomFieldValue(customField, origIssue.getCustomFieldValue(customField))
Hi @Martin Bayer _MoroSystems_ s_r_o__
I've already tried the second one, and I'm able to copy it's value. The problem is, that when the new issue is created, an other script has to handle that, but without this custom field value, it will fails all the time.
What I trying to do:
1. create issue (without the custom field value) in a post-function at the original issue and link them together
2. catch the create issue event, and fill this custom field
3. further tasks with new issue in an other post function
It fails at 2. because issue2 is null... As I think, the first point is slower than the second, so at that moment when 2. starts, issue2 is not exists yet. Or the linking is too slow?!
Now I have to create issue2 and then link it to issue1 in the same script.
Is there a way to link issue1 and issue2 at the same time when I create issue2 ?
I've planned trying to clone issue2, but I don't need every field. Can I decide what will issue2 inherits os at least exclude some fields?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kiss Zoltán thank you for clarification. And what about this postfunction prepared by Adaptavist. It already contains link and custom field selection functionality:
https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_clones_an_issue_and_links
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.
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.