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.
Community moderators have prevented the ability to post new answers.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.