You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hi.
i have a linked issues
After creation of first ticket we need to take the summary into that second ticket.
i tried with scripting.but it is not effecting.can anyone suggest on this plz
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueManager;
import com.atlassian.jira.event.type.EventDispatchOption
import com.atlassian.jira.issue.fields.CustomField;
import groovy.json.JsonSlurper
import com.atlassian.jira.event.issue.IssueEvent
def issue = event.issue
if(issue.issueType.name == 'Onboarding-Manager Submitted'){
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
CustomField EmployeeName = customFieldManager.getCustomFieldObject("customfield_11601");
//Employee name customfield_11601 of Onboarding-HR Initiated
log.warn('EmployeeName'+EmployeeName)
String summaryValue;
def cfv1 = issue.getCustomFieldValue(EmployeeName);
if(cfv1){
summaryValue = cfv1
}
def im = ComponentAccessor.getIssueManager();
def issueToChange = im.getIssueObject(issue.id) as MutableIssue
issueToChange.setSummary(summaryValue)
//def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
//def userManager = ComponentAccessor.getUserManager();
//def user = userManager.getUserByName(currentUser.name)
//im.updateIssue(user, issueToChange, EventDispatchOption.DO_NOT_DISPATCH, false)
}
Hi @Bhavani kandukuri - Welcome to the Atlassian Community!
I have been able to do that with the Automation For Jira add-on. It's point and click for the most part and no scripting. :-)
We use the Automation For Jira add-on. It works great.
If that solved what you needed, can you click on the Accept answer button above to close this out? Thanks!
Never mind, this is a discussion lol