Skip to end of banner
Go to start of banner

getCustomFieldIdByName

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Availability

This routine is available starting with SIL Engine™ 4.8.0.11.

Syntax

getCustomFieldIdByName(customfieldName);

Description

Returns a list of ids for all custom fields with the given name.

Parameters

Parameter name

Type

Required

Description

Custom Field NameStringYesName of custom field to retrieve ids for.

Return type

String []

Returns an array of custom field ids.

Example 1

return getCustomFieldIdByName("My Custom Field");

Returns: "customfield_10101"

Example 2

This example has multiple custom fields for a single name.

string myCustomField;
for(string id in getCustomFieldIdByName("My Custom Field")) {
	//check the context for the calling issue to determine which custom field to use
	if(isCustomFieldInContext(id, projectKey, issueType) {
		myCustomField = id;
	}
} 

return myCustomField;

See also

  • No labels