public class

CustomFieldsImpl

extends AbstractFuncTestUtil
implements CustomFields
java.lang.Object
   ↳ com.atlassian.jira.functest.framework.AbstractFuncTestUtil
     ↳ com.atlassian.jira.functest.framework.admin.CustomFieldsImpl

Summary

[Expand]
Inherited Fields
From class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
Public Constructors
CustomFieldsImpl(WebTester tester, JIRAEnvironmentData environmentData, Navigation navigation, Form form)
Public Methods
String addConfigurationSchemeContext(String customFieldId, 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[] issueTypes, String[] projects)
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 customFieldId, 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 customFieldId)
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 customFieldId, 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.
[Expand]
Inherited Methods
From class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
From class java.lang.Object
From interface com.atlassian.jira.functest.framework.admin.CustomFields
From interface com.atlassian.jira.testkit.client.log.FuncTestLogger

Public Constructors

public CustomFieldsImpl (WebTester tester, JIRAEnvironmentData environmentData, Navigation navigation, Form form)

Public Methods

public String addConfigurationSchemeContext (String customFieldId, String label, String[] issueTypeIds, String[] projectIds)

Adds a custom field configuration scheme context.

Parameters
customFieldId 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

public 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

public String addCustomField (String fieldType, String fieldName, String[] issueTypes, String[] projects)

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
issueTypes the ids of the issue types; must not be null
projects the ids of the projects; must not be null
Returns
  • the custom field id e.g. customfield_10000

public 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

public 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

public void editConfigurationSchemeContextById (String customFieldId, String fieldConfigSchemeId, String label, String[] issueTypeIds, String[] projectIds)

Alters an existing custom field configuration scheme context.

Parameters
customFieldId 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

public 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

public 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

public 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

public 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

public 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

public void removeCustomField (String customFieldId)

Removes the custom field

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

public void removeGlobalContext (String customFieldId)

Removes the global context from the specified custom field's configuration schemes.

Parameters
customFieldId the numeric custom field id

public 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

public 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

public String setCustomFieldSearcher (String customFieldId, String searcherKey)

Sets the searcher for the specified custom field. Use the return value to reset the searcher to its previous value later.

Parameters
customFieldId 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

public 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