Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Custom Fields are a great method to create unique configurations for a specific component. This becomes very powerful when scaling your integrations and creating component templates with unique custom fields configured for each deployment.
In your Translator scripts, you can programmatically:
component.fields() to access a lua table of all configured custom field names and values. Here, we are storing our custom fields key value pairs in a variable called configs that can bw call in the script to pass configuration values like the database name we are connecting to.
component.setFields{} can be used to automate creating a custom field name and value. For example, when querying an API or Database, you can store particular as custom fields. Here, we are querying a weather API and storing the current temperature as a custom field.