Hi,
we would like to set a custom field value on an event. At the moment, we already have a script listener sending out email notifications. Can we add setting the field to this listener?
And: If we can, please give a hint on how to set it.
Does Groovy script do this only after user Submits the form?
Is there any event fired right after a field is modified (new option selected, text filled in) that Script Runner can catch it even before the form submitted?
Below Groovy example is to set text Custom Field
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.issue.util.DefaultIssueChangeHolder import com.atlassian.jira.issue.ModifiedValue def customFieldManager = ComponentAccessor.getCustomFieldManager(); def cf1 = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'cf1Name'}; def changeHolder = new DefaultIssueChangeHolder(); cf1.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(cf1), 'newCf1Value'), changeHolder); issue.store();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Does this also work for my custom field of type "select list (single choice)"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same question as @Sandra Meessen
I am trying to copy the value of my "select list (single choice)" from parent to child on an issue created event.
What would that script look like?
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.