We are required to have Customfield (text) to contain data from Issuekey & Summary in an Issue
Such merging & filling into a customfield, is possible by any scripting or available plugin ?
Appreciate your feedback
KCF - Kepler Custom Fields. The script is smth like:
return key + " " + summary;
There are others as well ....
HTH,
Radu
With ScriptRunner plugin and Groovy script set as Custom Listener (that can trigger on event like "Issue Created", "Issue Updated", "Issue Resolved", etc):
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.ModifiedValue import com.atlassian.jira.issue.util.DefaultIssueChangeHolder def issue = event.issue; def currentIssueKey = issue.toString(); def summaryFieldValue = issue.getSummary().toString(); def newFieldValue = currentIssueKey + ' ' + summaryFieldValue; def customFieldManager = ComponentAccessor.getCustomFieldManager(); def changeHolder = new DefaultIssueChangeHolder(); def customTextField = customFieldManager.getCustomFieldObjectByName("Custom Text Field"); customTextField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(customTextField), newFieldValue), changeHolder);
Thanks for the script, Radu. There are errors as in below, while just checking in Script console. Any thoughts, please ?
This is groovy, not SIL over / KCF (with its simpler scripting language).
It looks like you're new here. Sign in or register to get started.