Hi Everyone,
I'm working on creating an automation role that links the current issue with another issue in an issue picker field. I'm using the below script however I'm not sure what is the issue. can you support ?
,,,,
Hi @Fadi Shahwan,
Jira does not have the issue picker type of fields natively. Do you have an add-on installed that provides these types of fields?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Fadi Shahwan, try this:
import com.atlassian.jira.component.ComponentAccessor
def issuePickerField = issue.getCustomFieldValue(ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Single Issue Picker"))
def linkedIssueKey = Issues.getByKey(issuePickerField.key)
if (issuePickerField) {
issue.link('relates', linkedIssueKey)
}
You can use the method link() as it's shown in the example in Adaptivist library: https://library.adaptavist.com/entity/search-and-link-issues
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.
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.