com.atlassian.jira.functest.framework.admin
Interface CustomFields

All Known Implementing Classes:
CustomFieldsImpl

public interface CustomFields

Actions for administering the custom fields in JIRA.

Since:
v4.0

Method Summary
 String addConfigurationSchemeContext(String numericCustomFieldId, String label, String[] issueTypeIds, String[] projectIds)
          Adds a custom field configuration scheme context.
 String addCustomField(String fieldType, String fieldName)
          Adds a custom field of the specified type to JIRA.
 String addCustomField(String fieldType, String fieldName, String[] issueTypeIds, String[] projectIds)
          Adds a custom field of the specified type to JIRA.
 void addOptions(String numericCustomFieldId, String... options)
          Add options to a customfield that supports it (i.e.
 void disableOptions(String numericCustomFieldId, String... options)
          disable options from a customfield that supports them (i.e.
 void editConfigurationSchemeContextById(String numericCustomFieldId, String fieldConfigSchemeId, String label, String[] issueTypeIds, String[] projectIds)
          Alters an existing custom field configuration scheme context.
 void editConfigurationSchemeContextByLabel(String numericCustomFieldId, String label, String newLabel, String[] issueTypeIds, String[] projectIds)
          Alters an existing custom field configuration scheme context.
 void editOptionValue(String numericCustomFieldId, String option, String newValue)
          Change teh display value of an option from a customfield that supports them (i.e.
 void enableOptions(String numericCustomFieldId, String... options)
          enable options from a customfield that supports them (i.e.
 void removeConfigurationSchemeContextById(String numericCustomFieldId, String fieldConfigSchemeId)
          Removes the context from the specified custom field with the specified config scheme id.
 void removeConfigurationSchemeContextByLabel(String numericCustomFieldId, String fieldConfigSchemeLabel)
          Removes the context from the specified custom field with the specified config scheme id.
 void removeCustomField(String customFieldId)
          Removes the custom field
 void removeGlobalContext(String numericCustomFieldId)
          Removes the global context from the specified custom field's configuration schemes.
 void removeOptions(String numericCustomFieldId, String... options)
          Remove options from a customfield that supports them (i.e.
 String renameCustomField(String numericCustomFieldId, String newCustomFieldName)
          Renames the custom field.
 String setCustomFieldSearcher(String numericCustomFieldId, String searcherKey)
          Sets the searcher for the specified custom field.
 void setDefaultValue(String numericCustomFieldId, String defValue)
          Set default value for any custom field that supports default value.
 

Method Detail

addCustomField

String addCustomField(String fieldType,
                      String fieldName)
Adds a custom field of the specified type to JIRA. The default searcher is used, and the custom field is added to the global project/issue type context. The field is added to the Default Screen.

Parameters:
fieldType - the full name of the custom field type to add e.g. com.atlassian.jira.plugin.system.customfieldtypes:userpicker
fieldName - the name of the custom field e.g. UserCF
Returns:

A formatted String containing the id of the custom field, the format used is: customfield_customfield-id

For example, customfield_10000


addCustomField

String addCustomField(String fieldType,
                      String fieldName,
                      String[] issueTypeIds,
                      String[] projectIds)
Adds a custom field of the specified type to JIRA. The default searcher is used. The context is created for the specified issue types and projects. The field is added to the Default Screen.

Parameters:
fieldType - the full name of the custom field type to add e.g. com.atlassian.jira.plugin.system.customfieldtypes:userpicker
fieldName - the name of the custom field e.g. UserCF
issueTypeIds - the ids of the issue types; must not be null
projectIds - the ids of the projects; must not be null
Returns:
the custom field id e.g. customfield_10000

setCustomFieldSearcher

String setCustomFieldSearcher(String numericCustomFieldId,
                              String searcherKey)
Sets the searcher for the specified custom field. Use the return value to reset the searcher to its previous value later.

Parameters:
numericCustomFieldId - the numeric custom field id
searcherKey - the full key of the searcher to use e.g. com.atlassian.jira.plugin.system.customfieldtypes:numberrange. Use null to remove the searcher.
Returns:
the previously used searcher key

renameCustomField

String renameCustomField(String numericCustomFieldId,
                         String newCustomFieldName)
Renames the custom field.

Parameters:
numericCustomFieldId - the numeric custom field id
newCustomFieldName - the new name for the custom field e.g. My CF
Returns:
the previously used name

addConfigurationSchemeContext

String addConfigurationSchemeContext(String numericCustomFieldId,
                                     String label,
                                     String[] issueTypeIds,
                                     String[] projectIds)
Adds a custom field configuration scheme context.

Parameters:
numericCustomFieldId - the numeric custom field id
label - the new name
issueTypeIds - the ids of the issue types; must not be null
projectIds - the ids of the projects; must not be null
Returns:
the numeric id of the field config scheme created e.g. 10013

editConfigurationSchemeContextById

void editConfigurationSchemeContextById(String numericCustomFieldId,
                                        String fieldConfigSchemeId,
                                        String label,
                                        String[] issueTypeIds,
                                        String[] projectIds)
Alters an existing custom field configuration scheme context.

Parameters:
numericCustomFieldId - the numeric custom field id
fieldConfigSchemeId - the id of the scheme
label - the new name; use null if no update required
issueTypeIds - the ids of the issue types; use null if no update required
projectIds - the ids of the projects; use null if no update required

editConfigurationSchemeContextByLabel

void editConfigurationSchemeContextByLabel(String numericCustomFieldId,
                                           String label,
                                           String newLabel,
                                           String[] issueTypeIds,
                                           String[] projectIds)
Alters an existing custom field configuration scheme context.

Parameters:
numericCustomFieldId - the numeric custom field id
label - the label of the scheme
newLabel - the new name; use null if no update required
issueTypeIds - the ids of the issue types; use null if no update required
projectIds - the ids of the projects; use null if no update required

removeGlobalContext

void removeGlobalContext(String numericCustomFieldId)
Removes the global context from the specified custom field's configuration schemes.

Parameters:
numericCustomFieldId - the numeric custom field id

removeConfigurationSchemeContextById

void removeConfigurationSchemeContextById(String numericCustomFieldId,
                                          String fieldConfigSchemeId)
Removes the context from the specified custom field with the specified config scheme id.

Parameters:
numericCustomFieldId - the numeric custom field id
fieldConfigSchemeId - the numeric field config scheme id

removeConfigurationSchemeContextByLabel

void removeConfigurationSchemeContextByLabel(String numericCustomFieldId,
                                             String fieldConfigSchemeLabel)
Removes the context from the specified custom field with the specified config scheme id.

Parameters:
numericCustomFieldId - the numeric custom field id
fieldConfigSchemeLabel - the label of the field config scheme

removeCustomField

void removeCustomField(String customFieldId)
Removes the custom field

Parameters:
customFieldId - the full custom field id e.g. customfield_10000

addOptions

void addOptions(String numericCustomFieldId,
                String... options)
Add options to a customfield that supports it (i.e. selectlist)

Parameters:
numericCustomFieldId - the numeric customfield id
options - the options to add

setDefaultValue

void setDefaultValue(String numericCustomFieldId,
                     String defValue)
Set default value for any custom field that supports default value.

Parameters:
numericCustomFieldId - the numeric customfield id
defValue - default value

disableOptions

void disableOptions(String numericCustomFieldId,
                    String... options)
disable options from a customfield that supports them (i.e. selectlist)

Parameters:
numericCustomFieldId - the numeric custom field id
options - to disable

enableOptions

void enableOptions(String numericCustomFieldId,
                   String... options)
enable options from a customfield that supports them (i.e. selectlist)

Parameters:
numericCustomFieldId - the numeric custom field id
options - to enable

removeOptions

void removeOptions(String numericCustomFieldId,
                   String... options)
Remove options from a customfield that supports them (i.e. selectlist)

Parameters:
numericCustomFieldId - the numeric custom field id
options - to remove

editOptionValue

void editOptionValue(String numericCustomFieldId,
                     String option,
                     String newValue)
Change teh display value of an option from a customfield that supports them (i.e. selectlist)

Parameters:
numericCustomFieldId - the numeric custom field id
option - id to change


Copyright © 2002-2014 Atlassian. All Rights Reserved.