Hi, i’m trying to make my own custom field.
IT is work, but i’m trying to make a searcher for them but i’m unnable to do that.
this is my customfield type:
<span><customfield-type name="Prueba" i18n-name-key="jira-custom-field.name" key="admintextfield" class="com.inlogiq.plugins.jira.customfields.JiraCustomField"></span>
<span><description></span>Solo para administradores<span></description></span>
<span><resource type="velocity" name="view" location="/templates/customfields/view.vm"/></span>
<span><resource type="velocity" name="edit" location="/templates/customfields/edit2.vm"/></span>
<span><resource type="velocity" name="xml" location="/templates/customfields/xml.vm"/></span>
<span></customfield-type></span>
this is my searcher on the xml:
<span><customfield-searcher key="ExactTextSearcherBH" name="Exact Text Searcher BH" class="com.inlogiq.plugins.searcher.SearcherExactText"></span>
<span><!-- this element defines the valid custom field types for this searcher --></span>
<span><valid-customfield-type package="{myPluginKey}" key="admintextfield" /></span>
<span></customfield-searcher></span>
and this is my class
<span>package</span> com.inlogiq.plugins.searcher;
<span>import</span> com.atlassian.jira.issue.customfields.searchers.ExactTextSearcher;
<span>import</span> com.atlassian.jira.util.JiraComponentFactory;
<span>import</span> com.atlassian.jira.util.JiraComponentLocator;
<span>import</span> com.atlassian.jira.jql.operand.JqlOperandResolver;
<span>import</span> com.atlassian.jira.issue.customfields.searchers.transformer.CustomFieldInputHelper;
<span>import</span> com.atlassian.jira.web.FieldVisibilityManager;
<span>public</span> <span>class SearcherExactText extends ExactTextSearcher </span>{
<span>public SearcherExactText (final JqlOperandResolver jqlOperandResolver,final CustomFieldInputHelper customFieldInputHelper,final FieldVisibilityManager fieldVisibilityManager ) </span>{
<span>super</span>(jqlOperandResolver,customFieldInputHelper,fieldVisibilityManager);
}
}i found this error on atlassian-jira.log
Exception <span>when</span> retrieving plugin <span>module</span> {myPluginKey}:ExactTextSearcherBH, disabling plugin {myPLuginKey}
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name <span>'com.inlogiq.plugins.searcher.SearcherExactText'</span>: Unsatisfied dependency expressed through constructor parameter <span>0</span>; nested exception <span>is</span> org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean <span>of</span> type <span>'com.atlassian.jira.jql.operand.JqlOperandResolver'</span> available: expected at least <span>1</span> bean which qualifies <span>as</span> autowire candidate. Dependency annotations: {}