Class CustomFieldsImpl
java.lang.Object
com.atlassian.jira.functest.framework.admin.CustomFieldsImpl
- All Implemented Interfaces:
CustomFields
- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionCustomFieldsImpl(net.sourceforge.jwebunit.WebTester tester, JIRAEnvironmentData environmentData, Navigation navigation, Form form) -
Method Summary
Modifier and TypeMethodDescriptionaddConfigurationSchemeContext(FieldId fieldId, String label, String[] issueTypeIds, String[] projectIds) Adds a custom field configuration scheme context.addConfigurationSchemeContext(String customFieldId, String label, String[] issueTypeIds, String[] projectIds) Adds a custom field configuration scheme context.addCustomField(String fieldType, String fieldName) Adds a custom field of the specified type to JIRA.addCustomField(String fieldType, String fieldName, String[] issueTypes, String[] projects) Adds a custom field of the specified type to JIRA.voidaddOptions(String numericCustomFieldId, String... options) Add options to a customfield that supports it (i.e.voiddisableOptions(String numericCustomFieldId, String... options) disable options from a customfield that supports them (i.e.voideditConfigurationSchemeContextById(String customFieldId, String fieldConfigSchemeId, String label, String[] issueTypeIds, String[] projectIds) Alters an existing custom field configuration scheme context.voideditConfigurationSchemeContextByLabel(String numericCustomFieldId, String label, String newLabel, String[] issueTypeIds, String[] projectIds) Alters an existing custom field configuration scheme context.voideditOptionValue(String numericCustomFieldId, String option, String newValue) Change teh display value of an option from a customfield that supports them (i.e.voidenableOptions(String numericCustomFieldId, String... options) enable options from a customfield that supports them (i.e.voidgoToCustomFieldConfiguration(FieldId fieldId) Navigates to `Configure Custom Field` page.voidgoToCustomFieldConfiguration(String numericCustomFieldId) Navigates to `Configure Custom Field` page.voidremoveConfigurationSchemeContextById(String numericCustomFieldId, String fieldConfigSchemeId) Removes the context from the specified custom field with the specified config scheme id.voidremoveConfigurationSchemeContextByLabel(String numericCustomFieldId, String fieldConfigSchemeLabel) Removes the context from the specified custom field with the specified config scheme id.voidremoveCustomField(String customFieldId) Removes the custom fieldvoidremoveGlobalContext(String customFieldId) Removes the global context from the specified custom field's configuration schemes.voidremoveOptions(String numericCustomFieldId, String... options) Remove options from a customfield that supports them (i.e.renameCustomField(String numericCustomFieldId, String newCustomFieldName) Renames the custom field.voidsetCascadingSelectDefaultValue(String numericCustomFieldId, String defValue, String cascadingDefValue) Set default value for any custom field that supports default value.setCustomFieldSearcher(String customFieldId, String searcherKey) Sets the searcher for the specified custom field.voidsetDefaultValue(FieldId fieldId, String defValue) Set default value for any custom field that supports default value.voidsetDefaultValue(String numericCustomFieldId, String defValue) Set default value for any custom field that supports default value.
-
Constructor Details
-
Method Details
-
addCustomField
Description copied from interface:CustomFieldsAdds 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.- Specified by:
addCustomFieldin interfaceCustomFields- Parameters:
fieldType- the full name of the custom field type to add e.g.com.atlassian.jira.plugin.system.customfieldtypes:userpickerfieldName- 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
public String addCustomField(String fieldType, String fieldName, String[] issueTypes, String[] projects) Description copied from interface:CustomFieldsAdds 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.- Specified by:
addCustomFieldin interfaceCustomFields- Parameters:
fieldType- the full name of the custom field type to add e.g.com.atlassian.jira.plugin.system.customfieldtypes:userpickerfieldName- the name of the custom field e.g.UserCFissueTypes- the ids of the issue types; must not be nullprojects- the ids of the projects; must not be null- Returns:
- the custom field id e.g.
customfield_10000
-
setCustomFieldSearcher
Description copied from interface:CustomFieldsSets the searcher for the specified custom field. Use the return value to reset the searcher to its previous value later.- Specified by:
setCustomFieldSearcherin interfaceCustomFields- Parameters:
customFieldId- the numeric custom field idsearcherKey- the full key of the searcher to use e.g.com.atlassian.jira.plugin.system.customfieldtypes:numberrange. Usenullto remove the searcher.- Returns:
- the previously used searcher key
-
renameCustomField
Description copied from interface:CustomFieldsRenames the custom field.- Specified by:
renameCustomFieldin interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric custom field idnewCustomFieldName- the new name for the custom field e.g.My CF- Returns:
- the previously used name
-
addConfigurationSchemeContext
public String addConfigurationSchemeContext(String customFieldId, String label, String[] issueTypeIds, String[] projectIds) Description copied from interface:CustomFieldsAdds a custom field configuration scheme context.- Specified by:
addConfigurationSchemeContextin interfaceCustomFields- Parameters:
customFieldId- the numeric custom field idlabel- the new nameissueTypeIds- the ids of the issue types; must not be nullprojectIds- the ids of the projects; must not be null- Returns:
- the numeric id of the field config scheme created e.g.
10013
-
addConfigurationSchemeContext
public String addConfigurationSchemeContext(FieldId fieldId, String label, String[] issueTypeIds, String[] projectIds) Description copied from interface:CustomFieldsAdds a custom field configuration scheme context.- Specified by:
addConfigurationSchemeContextin interfaceCustomFields- Parameters:
fieldId- field idlabel- the new nameissueTypeIds- the ids of the issue types; must not be nullprojectIds- the ids of the projects; must not be null- Returns:
- the numeric id of the field config scheme created e.g.
10013
-
editConfigurationSchemeContextById
public void editConfigurationSchemeContextById(String customFieldId, String fieldConfigSchemeId, String label, String[] issueTypeIds, String[] projectIds) Description copied from interface:CustomFieldsAlters an existing custom field configuration scheme context.- Specified by:
editConfigurationSchemeContextByIdin interfaceCustomFields- Parameters:
customFieldId- the numeric custom field idfieldConfigSchemeId- the id of the schemelabel- the new name; use null if no update requiredissueTypeIds- the ids of the issue types; use null if no update requiredprojectIds- the ids of the projects; use null if no update required
-
editConfigurationSchemeContextByLabel
public void editConfigurationSchemeContextByLabel(String numericCustomFieldId, String label, String newLabel, String[] issueTypeIds, String[] projectIds) Description copied from interface:CustomFieldsAlters an existing custom field configuration scheme context.- Specified by:
editConfigurationSchemeContextByLabelin interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric custom field idlabel- the label of the schemenewLabel- the new name; use null if no update requiredissueTypeIds- the ids of the issue types; use null if no update requiredprojectIds- the ids of the projects; use null if no update required
-
removeGlobalContext
Description copied from interface:CustomFieldsRemoves the global context from the specified custom field's configuration schemes.- Specified by:
removeGlobalContextin interfaceCustomFields- Parameters:
customFieldId- the numeric custom field id
-
removeConfigurationSchemeContextById
public void removeConfigurationSchemeContextById(String numericCustomFieldId, String fieldConfigSchemeId) Description copied from interface:CustomFieldsRemoves the context from the specified custom field with the specified config scheme id.- Specified by:
removeConfigurationSchemeContextByIdin interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric custom field idfieldConfigSchemeId- the numeric field config scheme id
-
removeConfigurationSchemeContextByLabel
public void removeConfigurationSchemeContextByLabel(String numericCustomFieldId, String fieldConfigSchemeLabel) Description copied from interface:CustomFieldsRemoves the context from the specified custom field with the specified config scheme id.- Specified by:
removeConfigurationSchemeContextByLabelin interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric custom field idfieldConfigSchemeLabel- the label of the field config scheme
-
removeCustomField
Description copied from interface:CustomFieldsRemoves the custom field- Specified by:
removeCustomFieldin interfaceCustomFields- Parameters:
customFieldId- the full custom field id e.g.customfield_10000
-
addOptions
Description copied from interface:CustomFieldsAdd options to a customfield that supports it (i.e. selectlist)- Specified by:
addOptionsin interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric customfield idoptions- the options to add
-
setDefaultValue
Description copied from interface:CustomFieldsSet default value for any custom field that supports default value.- Specified by:
setDefaultValuein interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric customfield iddefValue- default value
-
setDefaultValue
Description copied from interface:CustomFieldsSet default value for any custom field that supports default value.- Specified by:
setDefaultValuein interfaceCustomFields- Parameters:
fieldId- field iddefValue- default value
-
setCascadingSelectDefaultValue
public void setCascadingSelectDefaultValue(String numericCustomFieldId, String defValue, String cascadingDefValue) Description copied from interface:CustomFieldsSet default value for any custom field that supports default value.- Specified by:
setCascadingSelectDefaultValuein interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric customfield iddefValue- display text of default valuecascadingDefValue- display text of default cascading value
-
removeOptions
Description copied from interface:CustomFieldsRemove options from a customfield that supports them (i.e. selectlist)- Specified by:
removeOptionsin interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric custom field idoptions- to remove
-
disableOptions
Description copied from interface:CustomFieldsdisable options from a customfield that supports them (i.e. selectlist)- Specified by:
disableOptionsin interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric custom field idoptions- to disable
-
enableOptions
Description copied from interface:CustomFieldsenable options from a customfield that supports them (i.e. selectlist)- Specified by:
enableOptionsin interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric custom field idoptions- to enable
-
editOptionValue
Description copied from interface:CustomFieldsChange teh display value of an option from a customfield that supports them (i.e. selectlist)- Specified by:
editOptionValuein interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric custom field idoption- id to change
-
goToCustomFieldConfiguration
Description copied from interface:CustomFieldsNavigates to `Configure Custom Field` page.- Specified by:
goToCustomFieldConfigurationin interfaceCustomFields- Parameters:
numericCustomFieldId- the numeric custom field id
-
goToCustomFieldConfiguration
Description copied from interface:CustomFieldsNavigates to `Configure Custom Field` page.- Specified by:
goToCustomFieldConfigurationin interfaceCustomFields- Parameters:
fieldId- field id
-