I am using custom code - on workflow transition - when creating sub-task, code is updating text in summary field.
The code i am using with scriptrunner
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.Issue
def issueManager = ComponentAccessor.getIssueManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObject("customfield_11201")
def cFieldValue = issue.getCustomFieldValue(cField)
def a = cFieldValue.toString()
def x = a.indexOf('[')
def y = a.indexOf(']')
if (cFieldValue != null )
{def newSummary = a[x..y+1] + issue.summary
issue.summary = newSummary}
It should update summary field with text from another custom field. If in custom filed is text [ACC] - Accounting, then when user creates sub-task, field summary should be updated like this [ACC] + summary
The problem i noticed that in filter for an issues, ie. Open issues i am getting this:
(this text [nul] - is dynamic, when i scroll issues it dissapears, or when i click on an issue, but then it show back again.
Any help would be appreciated?
