Hey
Anyone know how to make a plugin create a custom field, during installation. (like Greenhopper's rank, story, ect)
You're right, I didn't understand the question properly :-)
Anyway, it's fairly straightforward - get hold of the CustomFieldManager, create a new CustomField and then associate it with a screen using the FieldScreenManager, something like:
CustomField customField = customFieldManager.createCustomField(name, desc, type, searcher, contexts, issueTypes); // fetch the default screen FieldScreen defaultScreen = fieldScreenManager.getFieldScreen(FieldScreen.DEFAULT_SCREEN_ID); //don't add it if already added if (! defaultScreen.containsField(customField.getId())) { // just add the field to the JIRA List (which starts at 0) FieldScreenTab firstTab = defaultScreen.getTab(0); firstTab.addFieldScreenLayoutItem(customField.getId()); }
Here's a tutorial that may help - https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Creating+a+Custom+Field+in+JIRA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure you understood my question correct.
I know how to create a custom field plugin.
What im looking for is information about creating a field in JIRA (with a certin name, ect.) when im installing the plugin.
So if i create a plugin (myPlugin), with a custom field (myCF).
When i install myPlugin in our jira environment, it automaticaly creates a new custom field of myCF type, with a name, ect descriped within the plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.