Advanced Scripting
Advanced mode (scripting) provides a way to customize app logic when it comes to building data that is going to be sent out to apps via API.
Read more here https://getint.io/introducing-getint-io-advanced-scripting/
The script should be compliant with JS syntax. It is basically JavaScript code that is run by GetInt when specific events will be triggered.
Here is the list of events for which you can define the script, and available functions / variables:
On before integration runs
Is run every time just before integration runs
On before item request object sent
Is run before CREATE or UPDATE requests are sent with item data
e.g. if ITEM-1 was modified in Jira and will be synced with Azure Work Item #32, state.triggerObj
contains data of ITEM-1 and state.reqObj
is a constructed data object that will update #32
On before comment is created
If state.comment.skipped
flag is set up and equal true
comment will be skipped and the request won't be sent.
Example
Migrating GitLab issue to Jira. Except for field data we want to copy to Jira information about related merge requests to the given GitLab issue. GitLab offers API where we can that necessary information and obtain Pull Requests data in JSON format. Jira is on the left side in integration and GitLab is on the right side. To achieve what we need we have to put below JavaScript code under the Before item request object sent (left app) option.
If you can't find what you're looking for on this page or need custom development for your specific case, don't hesitate to schedule a call with us here. Our fantastic team at Getint is always ready to assist you!
Last updated