how to add an option in the "com.atlassian.jira.plugin.system.customfieldtypes: multicheckboxes" and set a standard option

Victor Viana January 14, 2013

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());
		}
		
	}

1 answer

1 accepted

Ed Adjei June 27, 2019

does anyone know how I programatically set a value in this type of field?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events