Missed Team ’24? Catch up on announcements here.

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

Searcher customization

Muzaffer Ozakca November 13, 2011

Hi,

I implemented a custom field that allows a subset of projects to be displayed (based on a few selected Project Categories). Now, I'm working on a searcher for that custom field and I need to show the same subset. So, I'm looking into the ways searchers can be customized like what context is available to them. As we don't have access to an instance of the customfield I wonder how I can pass parameters to my searcher. Any ideas?

Thanks.

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Muzaffer Ozakca November 14, 2011

Hi I solved this problem by extending the ProjectSearcher class of the customfields package. I also extended the CustomFieldRenderer (in the getEditHtml method) to inject parameters in to the velocity context. I hope Jira5 comes with more Javadoc to make development a bit easier.

0 votes
Muzaffer Ozakca November 14, 2011

I'm looking into CustomFieldSearchers and renderers right now but I am still not able to pass parameters to the velociy context while doing a search. I'd appreciate any pointers on this.

0 votes
Muzaffer Ozakca November 13, 2011

To make it a bit more clearer: I'd like to restrict the number of options shown in a list of options a user can choose when doing searches, e.g. a subset of projects in a search by project field. To do that I need to be able to pass parameters or lists of values to a search field. I noticed that the existing implementations (search-project.vm) has access to $configs.options but I'm not sure I understand how and where that list is populated. If $configs.options is not easily accessible from the custom field searcher code, I'd like to know how I can pass parameters to the velocity context for the Issue Navigator.

TAGS
AUG Leaders

Atlassian Community Events