Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to troubleshoot JIRA customfield searcher

courchesne July 2, 2015

Hi,

I'm developping a new JIRA custom field (AbstractMultiCFType).  My field works just fine and I want to add search and sort functionnality.  So I added a new plugin module «atlas-create-jira-plugin-module» for searching.

When I load my plugin the column in my issue navigator doesn't allow me to sort or search,  Here is my atlassian-plugin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">
  <plugin-info>
    <description>${project.description}</description>
    <version>${project.version}</version>
    <vendor name="${project.organization.name}" url="${project.organization.url}"/>
    <param name="plugin-icon">images/pluginIcon.png</param>
    <param name="plugin-logo">images/pluginLogo.png</param>
  </plugin-info>
  <!-- add our i18n resource -->
  <resource type="i18n" name="i18n" location="CompteUsagerUQTR"/>
  <!-- add our web resources -->
  <web-resource key="CompteUsagerUQTR-resources" name="CompteUsagerUQTR Web Resources">
    <dependency>com.atlassian.auiplugin:ajs</dependency>
    <context>atl.general</context>
    <resource type="download" name="CompteUsagerUQTR.css" location="/css/CompteUsagerUQTR.css"/>
    <resource type="download" name="CompteUsagerUQTR.js" location="/js/CompteUsagerUQTR.js"/>
    <resource type="download" name="images/" location="/images"/>
    <context>CompteUsagerUQTR</context>
  </web-resource>
  <!-- import from the product container -->
  <component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties"/>
  <customfield-type name="Compte Usager UQTR" i18n-name-key="compte-usager-uqtr.name" key="compte-usager-uqtr" class="ca.uqtr.jira.plugin.CompteUsagerUQTR">
    <description key="compte-usager-uqtr.description">The Compte Usager UQTR Plugin</description>
    <resource name="view" type="velocity" location="/templates/templates/customfields/compte-usager-uqtr/view.vm"/>
    <resource name="edit" type="velocity" location="/templates/templates/customfields/compte-usager-uqtr/edit.vm"/>
    <resource type="velocity" name="xml" location="templates/plugins/fields/xml/xml-basictext.vm"/>
  </customfield-type>
  <ao key="ao-module">
    <description>The configuration of the Active Objects service</description>
    <entity>ca.uqtr.jira.plugin.InfoCompte</entity>
  </ao>
  <component-import key="ao" name="Active Objects components" interface="com.atlassian.activeobjects.external.ActiveObjects">
    <description>Access to the Active Objects service</description>
  </component-import>
  <customfield-searcher name="Compte Usager UQTR Searcher" i18n-name-key="compte-usager-uqtr-searcher.name" key="compte-usager-uqtr-searcher" class="ca.uqtr.jira.plugin.CompteUsagerUQTRSearcher">
    <description key="compte-usager-uqtr-searcher.description">The Compte Usager UQTR Searcher Plugin</description>
    <resource name="search" type="velocity" location="/templates/customfields/compte-usager-uqtr-searcher/search.vm"/>
    <resource name="view" type="velocity" location="/templates/customfields/compte-usager-uqtr-searcher/search.vm"/>
    <valid-customfield-type package="ca.uqtr.jira.plugin.CompteUsagerUQTR" key="compte-usager-uqtr"/>
  </customfield-searcher>
</atlassian-plugin>

I search a way to make it work or to troubleshoot and know what's wrong..

Thanks

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
courchesne July 15, 2015

Finally JIRA is recognizing my searcher after I refactored all the code of the plugin to use all function.

Note that it recognize it only in my JIRA server; I can't make it work on the JIRA instance that come with the SDK.

0 votes
courchesne July 3, 2015

Here is my plugin page, all plugins seems to work just fine: 

image2015-7-3 8:42:39.png

The searcher is active and the custom field too, is there any other thing i gotta check?

0 votes
courchesne July 2, 2015

${project.groupId}.${project.artifactId} refer to ca.uqtr.jira.plugin.CompteUsagerUQTR si I think that part is ok..

I dont know how to set the searcher:

image2015-7-2 16:19:13.png

If it is search template, he is empty..?

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2015

Check under the plugin modules to see if the searcher was loaded correctly. For some reason, it is not associated with the field.

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2015

package on the valid-customfield-type tag should be the JIRA plugin key and not the java package. If that is correct, make sure you have set the searcher after creating the custom field.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events