- This article shows an example of how you can create an example groovy file, add a script and call it in the Sync Rules.
Make sure you have the scripts directory
The directory location depends on the issue tracking platform.
External scripts library location
Jira Server: $JIRA_HOME/scripts
Jira Cloud: opt/jcloudnode/data/scripts
HP ALM/QC: opt/hpqcnode/data/scripts
To get the folder for Jira Cloud please submit a support request, since Exalate app is hosted on our servers.
Create BasicFieldSync.groovy file with the following code, and store it in the right location on your server. There is no need to restart instance / add-on to enable the external script.
Call the BasicFieldSync.groovy script from the Sync Rules
Replace the script in the outgoing sync rules (create and change processors) as below:
Existing scriptNew script
Now you have one file with basic synchronization rules. You can reuse it in outgoing sync processors: new issues(create processor) and for existing issues(change processor)
If you add new code into the BasicFieldSync.groovy, it will be automatically executed in your incoming sync rules (create and change processors).
Now you can set up the advanced scripting environment and start working with Sync Rules using git.