Skip to end of banner
Go to start of banner

How to Use Script Parameters

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 »

For this example we configured a field to get all the data from a table and insert/update the value of a column based on the value of another custom field. So the configuration for the custom field should look like this:

Example of INSERT script:

INSERT INTO ORDER(ID, AMOUNT, DATE, CUSTOMER_CODE, PRODUCT_CODE) VALUES ({:1}, {:2}, {:3}, {:4}, {issue:customfield_11300})
// where customfield_11300 is a select list which contains the product codes

Example of UPDATE script:

UPDATE ORDER SET AMOUNT = {:2}, DATE = {:3}, CUSTOMER_CODE = {:4}, PRODUCT_CODE = {issue:customfield_11300} WHERE ID = {:1}
// where customfield_11300 is a select list which contains the product codes

Where {:1}...{:4} are the parameters corresponding to the columns and their values come from the interface.

{issue:customfield_11300} is the set value of the custom field in the issue.

If you are in Edit screen and you want to get the value displayed on the custom field you should use {screen:customfield_11300}

After setting up the scripts and saving the configuration go to an issue and insert/update the field.

  • No labels