It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I add a searcher to my custom field plugin?

I have migrated a custom field plugin to Jira 8.5 which is based on CalculatedCFType. As the field contains group names I want to add a searcher (Search Template) based on the GroupPickerSearcher class.

When adding the following lines to atlassian-plugin.xml:

<customfield-searcher key="grouppickersearcher" name="Group Picker Searcher"
<description key="admin.customfield.searcher.grouppickersearcher.desc">Allow to search for a group using a group picker.</description>
<resource type="velocity" name="label" location="templates/plugins/fields/view-searcher/label-searcher-group.vm"/>
<resource type="velocity" name="search" location="templates/plugins/fields/edit-searcher/search-grouppicker.vm"/>
<resource type="velocity" name="view" location="templates/plugins/fields/view-searcher/view-searcher-grouppicker.vm"/>
<valid-customfield-type package="my.jira.plugins" key="my-reportercustomergroups"/>

this error occurs:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.atlassian.jira.issue.customfields.searchers.GroupPickerSearcher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.atlassian.jira.issue.customfields.converters.GroupConverter' available: expected single matching bean but found 2: multiGroupConverter,groupConverter

How can I enable usage of the GroupPickerSearcher with my custom field?

2 answers

0 votes

I don't know the answer to your question, but just in case you haven't, another good place to post development questions is the Atlassian Developer Community found here:

Couldn't hurt to post in both places!

Thanks, didn't realize there is an extra community for developers ;)

0 votes

A calculated field might contain any object type as its value.  A GroupPickerSearcher will only be able to work with a group or list of groups as the value of the field.  Does your calculated field return one of those?

Yes, it does return a Collection<Group>.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you