Hi Everyone,,
I created a Jira Custom Field 'Project Properties Viewer" and its searcher ProjectPropertiesViewerSearcher as described by the following code:
<atlassian-plugin key="${atlassian.plugin.key}" 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/jira-favicon-scaled.png</param>
<param name="plugin-logo">images/EngineeringALM-icon_medium.png</param>
</plugin-info>
<!-- add our i18n resource -->
<resource type="i18n" name="i18n" location="project-properties-viewer"/>
<!-- add our web resources -->
<web-resource key="project-properties-viewer-resources" name="project-properties-viewer Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="project-properties-viewer.css" location="/css/project-properties-viewer.css"/>
<resource type="download" name="project-properties-viewer.js" location="/js/project-properties-viewer.js"/>
<resource type="download" name="images/" location="/images"/>
<context>project-properties-viewer</context>
</web-resource>
<customfield-type key="ProjectPropertiesViewer" name="ESL ALM: Project Properties Viewer" class="it.eng.esl.jira.plugins.customfield.ProjectPropertiesViewerCustomField"
i18n-name-key="projectPropertiesViewer.name">
<description key="projectPropertiesViewer.description">Customfield to view the project properties in the issues</description>
<resource type="i18n" name="i18n" location="i18n.projectPropertiesViewer" />
<resource type="velocity" name="view" location="templates/plugins/fields/view/view-basictext.vm" />
<resource type="velocity" name="edit" location="templates/plugins/fields/edit/edit-basictext.vm"/>
<resource type="velocity" name="xml" location="templates/plugins/fields/xml/xml-basictext.vm"/>
</customfield-type>
<!-- Free Text Searcher -->
<customfield-searcher key="ppv-text-searcher" name="PPV Text Searcher" class="it.eng.esl.jira.plugins.customfield.ProjectPropertiesViewerSearcher">
<description key="admin.customfield.searcher.textsearcher.desc">Search for Project Properties Text Field using a free text search.</description>
<resource type="velocity" name="search" location="templates/plugins/fields/edit-searcher/search-basictext.vm"/>
<resource type="velocity" name="view" location="templates/plugins/fields/view-searcher/view-searcher-basictext.vm"/>
<valid-customfield-type package="${atlassian.plugin.key}" key="ProjectPropertiesViewer"/>
</customfield-searcher>
</atlassian-plugin>
public class ProjectPropertiesViewerSearcher extends TextSearcher {
public ProjectPropertiesViewerSearcher(FieldVisibilityManager fieldVisibilityManager,
JqlOperandResolver jqlOperandResolver,
CustomFieldInputHelper customFieldInputHelper) {
super (fieldVisibilityManager,jqlOperandResolver,customFieldInputHelper );
}
}
Then I added a Custom Field of type 'Project Properties Viewer' to Jira (let's name it Goofy for explanation purpose).
However when I use the Jira issues search bar and I type 'Goofy' I don't see my custom field among those suggested by the system, like it didn't exist.
What am I doing wrong? May this depend on the specific implementation for ProjectPropertiesViewerCustomField?