I'm trying to create a kind of customFieldManager multicheckboxes but do not know how to add an option to select what I'm creating.
I have the following code:
... String packageCustomFieldTypes = "com.atlassian.jira.plugin.system.customfieldtypes:"; List<GenericValue> issueTypes = new ArrayList<GenericValue>(); issueTypes.add(null); List<JiraContextNode> contexts = new ArrayList<JiraContextNode>(); contexts.add(GlobalIssueContext.getInstance()); CustomField cField = customFieldManager.createCustomField( name, description, customFieldManager.getCustomFieldType( "com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes"), customFieldManager.getCustomFieldSearcher("com.atlassian.jira.plugin.system.customfieldtypes:checkboxsearcher"), contexts, issueTypes ); // Add field to default Screen FieldScreen defaultScreen = fieldScreenManager.getFieldScreen(FieldScreen.DEFAULT_SCREEN_ID); if (!defaultScreen.containsField(cField.getId())) { FieldScreenTab firstTab = defaultScreen.getTab(0); firstTab.addFieldScreenLayoutItem(cField.getId()); } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.