The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add parameter for custom field (Group Picker)

Adam Dyga
January 10, 2012

Hi,

I'm developing a new custom field plugin (Limited Group Picker) and would like to let the user specify one parameter for this field. It should be configurable on http://host/jira/secure/admin/ConfigureCustomField!default.jspa?customFieldId=XXXXXX . What is the best way to do this?

I have already found out how to create my own field by subclussing MultiGroupCFType, how to create a new group picker (based on GroupPickerBrowser and grouppicker.jsp), but I cannot find a way to add a new parameter that would be displayed on fields "Configure" screen.

Thanks,

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
JamieA
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 Champions.
January 10, 2012

You need to override getConfigurationItemTypes on your customfield type. Have a look at the code here, it's pretty straightforward - https://bitbucket.org/jamieechlin/issue-alternative-assignee/src/c83e17f19000/src/main/java/com/iamhuy/jira/plugin/customfields.

Also the (freely-available) example code for Matt Doar's book "Practical JIRA Plugins" has an example of this - but buy the book too.

Adam Dyga
January 11, 2012

Thanks for your tips, they were very helpful. I followed your examples, but encountered another problem. I develop the plugin in Eclipse, whose workspace (and project) has been configured to use M2_REPO variable (pointing to ~/.m2/repository). The repository has been created as a result of running atlas-create-jira-plugin script. The problem is that when I try to subclass com.atlassian.jira.web.action.admin.customfields.AbstractEditConfigurationItemAction this class cannot be found in the classpath. What should I do in this situation, should I manually add an artifact to my local repository? If so, which one?

JamieA
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 Champions.
January 11, 2012

I think this is a separate question, you will have better results starting a new thread, because people will often not look at answered questions.

0 votes
Michael Danielsson
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 Champions.
April 25, 2012

Hello

Did you get the code to work?

I'm also trying to develop a "Limited Group Picker". I have extended GroupPickerBrowser to limit the number of groups displayed but failed to add configuration parameters.

Any suggestions?

Regards,

Michael Danielsson

TAGS
AUG Leaders

Atlassian Community Events