Created a Task in a different project by using "Clones an issue, and links" with the following Additional issue actions.
import com.onresolve.scriptrunner.runner.util.UserMessageUtil;
import com.atlassian.jira.component.ComponentAccessor;
def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'Epic Name'}
issue.setCustomFieldValue(cf, 'Cloned Issue Epic Name' + sourceIssue.key + ': ' + sourceIssue.summary)
issue.summary = 'Cloned Issue ' + sourceIssue.key + ': ' + sourceIssue.summary
The issue is created successfully and also linked with Issue link type "relates to".
Once this new issue is cloned and created, I would three subtasks to be created for the newly created issue by adding some actions to the existing script.
How can this be achieved?
Could you please take a look at this link, it may help.
You need to put this post-function to the Create transition in the workflow of newly created linked issue.
Unfortunately, that won't be possible in my scenario.
1. Project A ----clones and creates tickets to project B.
The tickets that are created in Project B by above step 1 should have subtask automatically created.
But, there are tickets that are created in Project B manually which does not need to have a subtask. Therefore, subtask should only be created automatically for ticket in project B when the ticket was created by Step 1 mentioned above. Can this be achived somehow?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do it indeed.
For example, you may run "Clones an issue, and links" function via run as user (ex: AutoUser) than add condition to "Create subtask" function (if creator is AutoUser). So, sub-task will not be created for other users.
It is also possible run your own groovy script if you are familiar. There are so many examples on the web.
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.