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?
Hi Kseniia,
Yes, I think it is one of scriprunner fields
@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
Many Thanks Kseniia, it is working
It looks like you're new here. Sign in or register to get started.