Skip to end of banner
Go to start of banner

Getting and Setting Custom Fields

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

« Previous Version 2 Next »

We've encountered an issue exporting this macro. Please try exporting this page again later.

Implicit Context

Whenever reading or storing a custom field value, the SIL Engine must be given an issue context so that it can connect those values to an issue. In most scripting environments (such as a listener or a custom workflow), the context is already provided.

Getting a Custom Field Value by Id

string value = customfield_1234;

Getting a Custom Field Value by Name

string value = #{custom field name};

Setting a Custom Field Value by Id

customfield_1234 = value;

Setting a Custom Field Value by Name

customfield_1234 = #{custom field name};

Explicit Context

There are times when you must explicitly declare the context of an issue. This is especially useful when looping through an array of issues.

Getting a Custom Field Value by Id

string value = key.customfield_1234;

Getting a Custom Field Value by Name

string value = key.#{custom field name};

Setting a Custom Field Value by Id

%key%.customfield_1234 = value;

Setting a Custom Field Value by Name

%key%.customfield_1234 = #{custom field name};

 When setting custom fields using an explicit context, you must surround the issue variable with percent signs.

Additional Help

Need help implementing this script? Talk to me directly to me by clicking on the bot on this page.

Filter by label

There are no items with the selected labels at this time.

  • No labels