I am trying to use a behavior to limit the available "Issue" options on the system issue links field
FormField issueLinkItems = getFieldById('issuelinks-issues')
String allowedLinkedItemsJql = "type = Bug"
//JiraHelper is a function I created that returns a SearchResult based on jql
//OPTION A: Set options based on the "Issue" interface
List<Issue> allowedLinkedItems = JiraHelper.findSearchResults(allowedLinkedItemsJql).getIssues()
issueLinkItems.setFieldOptions(allowedLinkedItems)
//OPTION B: Set options based on the issue key (as in, BUG-1234)
List<String> allowedLinkedItemsKeys = allowedLinkedItems.collect{it -> it.getKey()}
issueLinkItems.setFieldOptions(allowedLinkedItemsKeys)
Logs are spitting out errors:
A: Unsupported type class com.atlassian.jira.issue.DocumentIssueImpl in setFieldOptions()
B: Unsupported type class java.lang.String in setFieldOptions()
meaning, I'm not entering the right type of iterable into the setFieldOptions() form for this particular field.
Is there any way to do this using behaviors?
Any update on this?
I am also facing issue. any luck on the same?
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.